General InformationThis opening ID is invoked when using the Piping Spool Isometrics or the Piping Orthogonal Drawings command. In the interactive panel, the app displays up to five user defined properties. They can be properties of the Spool Reference or Instance.
Input ObjectsInput objects must be of the following types:
SampleThe following sample describes the Pipe Spool data to be displayed in the launch panels. Use the sample to define the business rule in the resource set. As input to the BR will be provided: VPMOccurrence of the Spool.
/*------------------------------------------------------------------------------*/ /* Rule name: CAAAITACPipeSpoolCustomerData1 */ /* */ /* Sample rule for retrieving the customer Pipe Spool data to be displayed */ /* in the launch panels. For pure information and Designer use only. */ /* Any properties can be returned as seemed to be fit. The same order should be */ /* returned for each spool though... */ /* */ /* Input Arguments */ /* ThisObject = FactType ProductOccurrence (=spool occurrence) */ /* */ /* Output Parameters */ /* PropertyName1 = string, name of 1st property. E.g. Section */ /* PropertyValue1 = string, value of 1st property. E.g. 0412 */ /* PropertyName2 = string, name of 2nd property. E.g. Block */ /* PropertyValue2 = string, value of 2nd property. E.g. 04 */ /* PropertyName3 = string, name of 3rd property. E.g. Outfitting Stage */ /* PropertyValue3 = string, value of 3rd property. E.g. Section */ /* PropertyName4 = string, name of 4th property. E.g. Conservation */ /* PropertyValue4 = string, value of 4th property. E.g. Rubber Lined */ /* PropertyName5 = string, name of 5th property. E.g. Material */ /* PropertyValue5 = string, value of 5th property. E.g. Carbon Steel */ . . /* PropertyValue10 = string, value of 10th property. E.g. Custom */ /* */ /* Data may be read from attributes on the spool reference or instance or */ /* dynamically retrieved from ENOVIA, or computed using */ /* SpoolOcc->QuerySpaces(NULL,1,....) */ /* or properties read from the pipes/fittings inside the spool. */ /*------------------------------------------------------------------------------*/ Let SpoolOcc(ProductOccurrence) Let SpoolRef(VPMReference) Let SpoolIns(VPMInstance) /* spool data */ Let strSection(String) Let strBlock(String) Let strOutfitStage(String) Let strConservation(String) Let strMaterial(String) /* initialize */ SpoolOcc=NULL SpoolRef=NULL SpoolIns=NULL strSection="" strBlock ="" strOutfitStage="" strConservation="" strMaterial="" /* ThisObject information */ Trace(1,"ThisObject : " + ThisObject.Name) /* Get the Spool occurrence */ Set SpoolOcc = ThisObject Trace(1,"Spool Occurrence : " + SpoolOcc.Name) /* Get the Spool instance */ Set SpoolIns = SpoolOcc Trace(1,"Spool Instance : " + SpoolIns.Name) /* Get the Spool reference */ Set SpoolRef = SpoolIns.Reference Trace(1,"Spool Reference: " + SpoolRef.Name) /* Read the attributes from the Spool (sample, customer dependent) */ strSection=SpoolIns.GetAttributeString("AITDesignUnit") strBlock =SpoolIns.GetAttributeString("AITBlock") strConservation=SpoolRef.GetAttributeString("AITInside_Conservation") // Output the result back to the calling code Parameters -> SetAttributeString("PropertyName1" , "Section") Parameters -> SetAttributeString("PropertyName2" , "Block") Parameters -> SetAttributeString("PropertyName3" , "Conservation") Parameters -> SetAttributeString("PropertyName4" , "Stage") Parameters -> SetAttributeString("PropertyName5" , "Material") Parameters -> SetAttributeString("PropertyValue1" , strSection) Parameters -> SetAttributeString("PropertyValue2" , strBlock) Parameters -> SetAttributeString("PropertyValue3" , strConservation) Parameters -> SetAttributeString("PropertyValue4" , strOutfitStage) Parameters -> SetAttributeString("PropertyValue5" , strMaterial) /* end */ Sample to retrieve the modified date, and 10 supported values
* Rule created on 1/21/2021 */ // Output the result back to the calling code Let modifiedDate(Date) Set modifiedDate = Parameters->GetAttributeDate("ProductModifiedDate") Let strDate(String) strDate = DateFormat("%c",modifiedDate) Parameters -> SetAttributeString("PropertyName1" , "Customer Defined Date") Parameters -> SetAttributeString("PropertyName2" , "Block") Parameters -> SetAttributeString("PropertyName3" , "Conservation") Parameters -> SetAttributeString("PropertyName4" , "Stage") Parameters -> SetAttributeString("PropertyName5" , "Material") Parameters -> SetAttributeString("PropertyName6" , "Custom1") Parameters -> SetAttributeString("PropertyName7" , "Custom2") Parameters -> SetAttributeString("PropertyName8" , "Custom3") Parameters -> SetAttributeString("PropertyName9" , "Custom4") Parameters -> SetAttributeString("PropertyName10" ,"Custom5") Parameters -> SetAttributeString("PropertyValue1", strDate) Parameters -> SetAttributeString("PropertyValue2" , "") Parameters -> SetAttributeString("PropertyValue3" , "") Parameters -> SetAttributeString("PropertyValue4" , "") Parameters -> SetAttributeString("PropertyValue5" , "") Parameters -> SetAttributeString("PropertyValue6" , "") Parameters -> SetAttributeString("PropertyValue7" , "") Parameters -> SetAttributeString("PropertyValue8" , "") Parameters -> SetAttributeString("PropertyValue9" , "") Parameters -> SetAttributeString("PropertyValue10", "") /* end */ |