Flexible Components
A flexible component allows variance of items such as features, dimensions, annotations, and parameters of a model in the context of an assembly.
The object ProAsmitem describes the contents of a variant item in an assembly component. The declaration for this object is as follows:
typedef struct pro_asm_item
{
ProModelitem item;
ProName name; /* used for PRO_PARAMETER in
this case item->type == PRO_PART or PRO_ASSEMBLY */
ProAsmcomppath path;
} ProAsmitem;
Refer to the section
Exploded State Objects for the declaration of the
ProModelitem object. The field
name in the
ProAsmitem object is used only in case of
PRO_PARAMETER; wherein the field
type in the
ProModelitem object is either
PRO_PART or
PRO_ASSEMBLY.
In case of parameter initialization, the field
name specifies the parameter name and the fields
type and
id in the
ProModelitem object initiate the model on which the parameter is defined. For non-parameter items such as features, dimensions, and annotations, the fields
owner,
type and
id in the
ProModelitem object have the same values as the values of the input arguments for the function
ProModelitemInit().
The field path specifies the path from the top-level component model. This field is empty if the variant items are defined on the top-level component model.
Functions Introduced:
Use the function
ProAsmcompAsmitemInit() to initialize the
ProAsmitem object that describes the contents of a variant item in an assembly component.
The function
ProAsmcompFlexibleSet() converts a specified assembly component to a flexible component based on an array of specified variant items.
Use the function
ProAsmcompFlexibleUnset() to convert a flexible assembly component to a regular component.
Use the function
ProAsmcompIsFlexible() to identify if the specified assembly component is a flexible component. The function returns
PRO_B_TRUE if the component is a flexible component, otherwise it returns
PRO_B_FALSE.
The function
ProAsmcompFlexiblemodelAdd() creates a flexible model from the specified model of the flexible component.
|
Note:
|
The model is temporarily converted into a flexible model in order to allow you to define variant items on it using the existing functions for variant items. If no variant items are added, the temporary flexible model becomes a regular one upon regeneration. You can convert a model into a temporary flexible model only via . For information on the functions that can be used to access and modify the variant items in a flexible assembly component, refer to the section Inheritance Feature and Flexible Component Variant Items.
|
The function
ProAsmcompVarieditemsToModelAdd() adds an array of specified variant items to the predefined flexibility definition of the specified component model. All varied items are replaced by the provided ones.
The function
ProAsmcompFlexibleWithPredefineditemsSet() converts a specified assembly component to a flexible component using the predefined flexibility definition of the variant items in the component model.