Context Object Parameters
Parameter Name |
Type |
Read or Write |
Comments |
TypeToCreate |
String |
Read/Write |
Displays the type of the PLM conductor to be created. If the
output is:Then the type of the cable is Elec3DCable. |
UseTypeForAllCables |
Boolean |
Read/Write |
Indicates whether all the PLM cables to be created have the same
type. If true, the business rule is not executed again for other PLM cables, because
all PLM cables have the same type. |
Sample
let logOcc (LogicalOccurrence)
let sTypeToCreate (STRING) // TypeToCreate
let sName (STRING)
let bUseForAll (Boolean) // UseTypeForAllCables
let facet2DInst(RFLVPMLogicalInstance)
set bUseForAll = false
set sTypeToCreate = ""
set logOcc = ThisObject.Facet2D
if(NULL <> logOcc)
{
/* By default create cable of default custo type Custo_ElecCable */
set sTypeToCreate = "Custo_ElecCable"
set facet3DInst = facet3DOcc.Instance
if(NULL <> facet3DInst)
{
/* If the discipline of logical cable is set with name of creation type, return it */
set sTypeToCreate = facet3DInst.GetAttributeString("V_description")
}
Parameters.Message = "Type computation succeeded: Type = " + sTypeToCreate
}
else
{
Parameters.Message = "Type computation failed: Inputs are invalid"
}
if(sTypeToCreate <> "" )
{
Parameters.SetAttributeString("TypeToCreate", sTypeToCreate)
Parameters.SetAttributeBoolean ("UseTypeForAllCables", bUseForAll)
}