Variant References
By using variant references, you can reroute or replace the references for features in the inheritance feature with new references located inside or outside the inheritance feature. In assemblies, references can be to models other than the target model, as long as the model is within the assembly.
In Creo TOOLKIT, a variant reference is represented by a ProVariantRef handle.
Function Introduced:
Use the function ProVariantrefAlloc() to allocate a handle used to describe a variant reference assigned to a variant feature (like inheritance features). The input arguments of this function are:
original_ref—Specifies the initial reference handle.
replacement_ref—Specifies the replacement reference handle.
feat_ids—Specifies a ProArray of feature ids (from the base model) which will be assigned to the reference replacement action.
Use the function ProVariantrefOriginalrefGet() to obtain the original reference that is replaced.
Use the function ProVariantrefOriginalrefSet() to assign the original reference that is to be replaced.
Use the function ProVariantrefReplacementrefGet() to obtain the replacement reference for replacing the original reference in this variant feature.
Use the function ProVariantrefReplacementrefSet() to assign the replacement reference for replacing the original reference in this variant feature.
Use the function ProVariantrefFeatidsGet() to obtain an array of the feature ids taken from the base model which are assigned the replacement reference.
Use the function ProVariantrefFeatidsSet() to assign an array of the feature ids taken from the base model which are assigned the reference replacement.
Note:
 
An assignment of a replacement reference to a feature applies only if the features actually use the replacement reference.
Use the function ProVariantfeatVariantrefsGet() to obtain the variant reference assignments (a ProArray of the variant reference) stored by this variant feature.
Use the function ProVariantfeatVariantrefsSet() to assign the variant reference assignments stored by this variant feature.
Use the function ProVariantrefFree() to free a handle used to describe a variant reference assigned to a variant feature and the function ProVariantrefProarrayFree() to free an array of handles used to describe a variant reference assigned to a variant feature.
도움이 되셨나요?