General Information
Input ObjectsInput objects must be of the following types:
SampleThe type of an instance can be displayed in and copied from the Parameters for Type Compatibility list in the Mechanical Interface Parameters panel. The following sample is a rule to check the type compatibility with the MIId as a basis:
/* Parameter definition */
let ToPlaceMId(String)
let TargetMId(String)
let SICompatibility(Integer)
let Undefined = 0
let Compatible = 1
let NotCompatible = 2
/* Parameter get */
set ToPlaceMId = Parameters.GetAttributeString("ToPlace_MIId")
set TargetMId = Parameters.GetAttributeString("Target_MIId")
/* Parameter check */
set SICompatibility = NotCompatible
if ((ToPlaceMId == "T#Key Housing 1G#FemaleU#f4e9c831_1aa4_55c994d8_7f2b2") and (TargetMId == "T#Key 1G#MaleU#f4e9c831_1aa4_55c992f1_6bb64"))
{
set SICompatibility = Compatible
Parameters.SetAttributeString( "IntermediatePart", "Yes" )
}
if ((ToPlaceMId == "T#Key 1G#MaleU#f4e9c831_1aa4_55c992f1_6bb64") and (TargetMId == "T#Key Housing 1G#FemaleU#f4e9c831_1aa4_55c994d8_7f2b2"))
{
set SICompatibility = Compatible
}
if(SICompatibility == Compatible)
{
Validation = True
Parameters.SetAttributeInteger("SICompatibility",SICompatibility)
Parameters.Message = "OK"
}
else if(SICompatibility == NotCompatible)
{
Validation = False
Parameters.SetAttributeInteger("SICompatibility",SICompatibility)
Parameters.Message = "KO"
}
| |||||||