General InformationThe table below provides the information related to the definition of the Opening ID:
Input ObjectsInput objects must be of the following type:
Context Object Parameters
Sample 1The following sample modifies the Electrical Accessory part instance when connected to another device:
let LoosePartInstance(VPMInstance)
let ConnectedDeviceInstance(VPMInstance)
let ConnectedPub(ElecPort)
set LoosePartInstance=ThisObject
set ConnectedDeviceInstance = Parameters->GetAttributeObject("ConnectedInstance")
set ConnectedPub=Parameters->GetAttributeObject("ConnectedPublication")
let LoosePartRef(VPMReference)
set LoosePartRef=LoosePartInstance.Reference
let CavityText(String)
if ( LoosePartRef->IsASortOf("Elec3DSeal") ) CavityText=" sealed"
else if ( LoosePartRef->IsASortOf("Elec3DContact") )
{
let CavityContact(Elec3DContact)
set CavityContact=LoosePartRef
if ( CavityContact <> NULL )
{
CavityText=" "+CavityContact.V_Elec_ContactType+" contact " }
}
else CavityText=""
let NewLoosePartInstanceName(String)
NewLoosePartInstanceName=ConnectedDeviceInstance.Name/*+"[ cavity : "+ConnectedPub.V_FunctionalName+CavityText+"]"*/
NewLoosePartInstanceName=NewLoosePartInstanceName+"[ cavity : "+ConnectedPub.V_FunctionalName+CavityText+"]"
LoosePartInstance.Name=NewLoosePartInstanceName
| |||||||||||||||||||||||||