General InformationThis opening ID is invoked when using the Export Electrical System command. It is called for any mechanical part that is aggregated under an electrical geometry linked to the electrical physical system selected in the command. For more information, see Electrical Manufacturing Preparation User's Guide: Electrical Physical System Export in KBL: Exporting an Electrical Physical System in KBL. This opening ID is used to specify for each mechanical part:
Input ObjectsInput objects must be of the following types:
Context Object Parameters
If the business rule for the opening ID is implemented:
If the business rule for the opening ID is not implemented:
SampleThe following sample gives an example of the business rule syntax:
let BR_severity(Integer)
let BR_message(String)
// get the input mechanical part occurrence
let PartOccurrenceToExport(ProductOccurrence)
set PartOccurrenceToExport = ThisObject
//Notify ( " mechanical part : ",PartOccurrenceToExport.Name())
// get the electrical part linked by mechanical constraint ( may be null )
let LinkedElectricalPartOccurrence(ProductOccurrence)
if ( Parameters->HasAttribute("ElectricalPartLinked") )
{
set LinkedElectricalPartOccurrence = Parameters->GetAttributeObject("ElectricalPartLinked")
//if ( LinkedElectricalPartOccurrence<> NULL ) Notify ( " linked to : ", LinkedElectricalPartOccurrence.Name())
// else Notify ( " not linked ")
}
// the export status
let KBLstatus(Boolean)
// the kbl accessory type
let KBLtype(String)
KBLtype=""
// get the input mechanical part instance attribute : description
let PartInstance(VPMInstance)
set PartInstance = PartOccurrenceToExport.Instance
let kbl_export_param(String)
kbl_export_param = PartInstance.V_description
// get attribute description length
let len (Integer)
len=0
len=kbl_export_param.Length()
//Notify ( " description :",kbl_export_param, " <",len,">")
// if no value set for description : the behavior is computed from linked electrical part
if ( len==0 )
{
// check linked object
let SupportOcc(SharedSupportPartOccurrence)
set SupportOcc = LinkedElectricalPartOccurrence
if( SupportOcc <> NULL ) // keep the part if linked object is a support
{
KBLstatus = TRUE
KBLtype="fixing_part"
//Notify ( " => linked part is a support : exported as Accessory type ",KBLtype)
}
else
{
KBLstatus = FALSE
}
}
// value set for description
else
{
// search separator position isep in
let isep(Integer)
isep=0
isep = kbl_export_param.Search(":",0)
// --- get export parameter : Keep or NoKeep
let export(String)
if ( isep>1)
{
export=kbl_export_param.Extract(0,isep)
}
//Notify ( " kbl export status : ",export)
// --- get the type value
let kbl_type(String)
if ( len > isep )
{
kbl_type=kbl_export_param.Extract(isep+1,len-isep-1)
}
//Notify ( " kbl accessory type : ",kbl_type)
if ( export == "Keep" )
{
KBLstatus = TRUE
KBLtype=kbl_type
}
else
{
KBLstatus = FALSE
}
}
// valuate BR output parameters
Parameters->SetAttributeBoolean("IsKBLAccessory",KBLstatus) // kbl export true or false
Parameters->SetAttributeString("KBLAccessoryType",KBLtype) // kbl accessory type
if ( KBLstatus==TRUE)
{
BR_severity=0
BR_message=PartOccurrenceToExport.Name()+" exported as KBL accessory type : "+KBLtype
}
else
{
BR_severity=1
BR_message=PartOccurrenceToExport.Name()+" not exported as KBL accessory"
}
Parameters.Severity=BR_severity
Parameters.Message=BR_message
// Notify ( BR_message," ",BR_severity)
| ||||||||||||||||||||||||||||||||||||||||