Check Mechanical Interface Validity

An opening ID is an entry point used to customize business logic. The validity rules are the business rules specified to check the local validity of a mechanical interface based on specific criteria.

They are useful for mechanical interface instantiation and so, these should be created before the instantiation. For example, to instantiate a mechanical interface template for a bushing, you can specify a rule to enable a valid instantiation if the inner diameter is within a certain range.

Note: For more information about customization by business rules, see Customization by Business Rules.

This page discusses:

General Information

This opening ID is invoked when using Mechanical Interface.

  • This opening ID is used to declare if a mechanical interface based on a template is valid.
  • There is one check per template.
  • The validity status can be used in connection rule.
  • If there is no rule for a Mechanical Interface type , it is considered as valid.

Sample

The following sample checks the local validity of a mechanical interface based on specific criteria.

They are useful for mechanical interface instantiation and so, these should be created before the instantiation. For example, to instantiate a mechanical interface template for a bushing, you can specify a rule to enable a valid instantiation if the inner diameter is within a certain range.

The following is a sample rule to check the validity for instantiation only if the primary diameter of the instance is 20 mm :

let ToPlacePrimaryDiameter (LENGTH)

if (Parameters.HasAttribute("ToPlace_Primary_Diameter") == true) {
set ToPlacePrimaryDiameter=Parameters.GetAttributeReal("ToPlace_Primary_Diameter")

  Validation = False
if (ToPlacePrimaryDiameter==20mm)
  Validation = True