In Creo Object TOOLKIT Java, the set of relations on any model or model item is represented by the pfcModelItem.RelationOwner interface. Models, features, surfaces, and edges inherit from this interface, because each object can be assigned relations
in Creo application.
Methods Introduced:
The method pfcModelItem.RelationOwner.RegenerateRelations regenerates the relations assigned to the owner item. It also determines whether the specified relation set is valid.
The method pfcModelItem.RelationOwner.DeleteRelations deletes all the relations assigned to the owner item.
The method pfcModelItem.RelationOwner.GetRelations returns the list of initial relations assigned to the owner item as a sequence of strings.
The method pfcModelItem.RelationOwner.SetRelations assigns the sequence of strings as the new relations to the owner item.
The method
pfcModelItem.RelationOwner.EvaluateExpression evaluates the given relations-based expression, and returns the resulting value in the form of the
pfcModelItem.ParamValue object. Refer to the section
The ParamValue Object in the
section Dimensions and Parameters for more information on this object.
The method wfcModelItem.WRelationOwner.EvaluateExpression has been deprecated. Use the method wfcModelItem.WRelationOwner.EvaluateExpressionWithUnits instead.
Use the method
wfcModelItem.WRelationOwner.EvaluateExpressionWithUnits if you want the units of the relation to be considered while evaluating the expression. Specify the input argument
Consider_units as true to consider the units. In this case, the result of the relation is returned along with its unit as
ParamValueWithUnits object. Refer to the section
The ParamValue Object in the
section Dimensions and Parameters for more information on this object.
The method wfcModelItem.WRelationOwner.UseUnits specifies if units must be considered while solving the specified relation. Use the method wfcModelItem.WRelationOwner.UnitsUsed to check if units will be considered while solving the relation.