Compute Cable Type (L2P_Compute3DCableType)

An opening ID is an entry point used to customize business logic. The Compute Cable Type opening ID is available in the Logical to Physical Assistant Resources resource set.

Note: For more information about customization by business rules, see Installation and Setup: Customize: Behavior: Data Setup: Customization by Business Rules.

This page discusses:

General Information

This opening ID is invoked to retrieve the type of a 3D cable.
Definition Description
PLM Opening ID L2P_Compute3DCable
Customization intent Computation
Execution context Client

Input Objects

Input objects must be of the following types:

  • ThisObject: an L2PItem_Cable for which you want to retrieve the type.
  • Parameters corresponds to the context object.

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:
  • Empty
  • Not found
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)
}