General InformationThis opening ID is invoked when using one of the following commands:
The rule is also invoked for all the scenarios where the instantiation context is taken from the Data Information panel like the Insert From Catalog or the Insert From Library. It gives you the information about the current instantiation. This opening ID is used to control the instantiation context when you insert a new or an existing component.
Input ObjectsInput objects must be of the following types:
Context Object Parameters
SampleIn the following sample, the rule returns TRUE for root reference and for all instances which do not have DUMMY in their Instance Title attribute, else it returns FALSE for all other cases.
let InputContextList(List)
set InputContextList=Parameters->GetAttributeObject("List_Contexts")
let OutputContextList(List)
Let isize = 0
set isize = InputContextList->Size()
Let j = 1
Notify("Rule Schematic_FilterInstantiationContext executed")
for j while j <= isize
{
let RootContextRefObject(RFLVPMLogicalReference)
set RootContextRefObject = InputContextList->GetItem(j)
if(NULL <> RootContextRefObject)
{
OutputContextList.Append(TRUE)
}
else
{
let ContextInstObject(RFLVPMLogicalInstance)
set ContextInstObject = InputContextList->GetItem(j)
let ContextName(String)
set ContextName = ContextInstObject.PLM_ExternalID
if(ContextName like '*DUMMY*' )
{
OutputContextList.Append(FALSE)
}
else
{
OutputContextList.Append(TRUE)
}
}
}
Parameters.SetAttributeObject("List_Bool_IsValidContext", OutputContextList)
| |||||||||||||||||||||||||||||||