API 文件集 > Features > Object ProPattern > Function ProPatternInAssemblyCreate
Function ProPatternInAssemblyCreate
Description
Creates a pattern in assembly, given the element tree.
NOTE:
Because a feature can be part of both a group pattern and feature pattern, you must specify the pattern object for this function. Use the functions ProFeatureGroupStatusGet() and ProFeatureGrppatternStatusGet() to get the appropriate information. Alternatively, you can use the feature element tree to get this information.
Synopsis
#include <ProPattern.h>
ProPatternInAssemblyCreate
(
ProAsmcomppath* p_component_path
/* (In)
The component path
*/
ProFeature* pattern_feature
/* (In)
The feature
*/
ProPatternClass pat_class
/* (In)
The pattern class
*/
ProElement elem_tree
/* (In)
The root element of the pattern element tree
*/
)
Returns
The function successfully created the pattern.
Model is in read-only state.
One or more of the arguments are invalid.
Unsupported model. For instance, models which come from Multi-CAD assemblies are not supported in this release.
Failed to create pattern feature. One of the reason for this error is- creating new pattern with a name that already exists.
這是否有幫助?