General InformationThis opening ID is invoked during the port modify command when the customization option is selected. This opening ID is used to customize the following attributes:
The table below provides you with information related to the definition of the Opening ID.
Input ObjectsInput objects must be of the following types:
Context Object Parameters
SampleThe following sample is for HVAC design:
Let Standard_val (String) Standard_val = Parameters ->GetAttributeString ( "V_Standard" ) Let EndStyle_val (String) EndStyle_val = Parameters -> GetAttributeString ( "V_EndStyle" ) Let EQD_val (String) EQD_val = Parameters -> GetAttributeString ( "V_EquivalentDiameter" ) Let Shape_val (String) Shape_val = Parameters -> GetAttributeString ( "V_Shape" ) Let Height_val (Real) Height_val = Parameters -> GetAttributeReal ( "V_Height" ) Let Width_val (Real) Width_val = Parameters -> GetAttributeReal ( "V_Width" ) Let CR_val (Real) CR_val = Parameters -> GetAttributeReal ( "V_CornerRadius" ) Let WallThickness_val (Real) WallThickness_val = Parameters -> GetAttributeReal ( "V_WallThickness" ) Let ModifiedAttrName (String) ModifiedAttrName = Parameters -> GetAttributeString ( "EditedParameter_Input" ) Let EQ_AsReal (Real) EQ_AsReal = EQD_val.SearchPattern("[0-9]*").ToReal()/1000 Let NeedComputeHeight (Boolean) NeedComputeHeight = FALSE Let NeedComputeWidth (Boolean) NeedComputeWidth = FALSE Let NeedComputeCR (Boolean) NeedComputeCR = FALSE Let output_message (String) if(ModifiedAttrName == "V_EquivalentDiameter") { NeedComputeHeight = TRUE NeedComputeWidth = TRUE NeedComputeCR = TRUE } else if(ModifiedAttrName == "V_Height") { NeedComputeWidth = TRUE NeedComputeCR = TRUE } else if(ModifiedAttrName == "V_Width") { if(Width_val < (Height_val * 2)) { output_message = "Width can not be less than " + (Height_val * 2000) + " (2 times the height)" Parameters -> SetAttributeReal("Width_Output", Height_val * 2) } else if(Width_val > (Height_val * 4)) { output_message = "Width can not be more than " + (Height_val * 4000) + " (4 times the height)" Parameters -> SetAttributeReal("Width_Output", Height_val * 4) } NeedComputeCR = TRUE } if(NeedComputeHeight) { Parameters ->SetAttributeReal("Height_Output", EQ_AsReal) Height_val = EQ_AsReal //to ensure next actions using height val are using the good one } if(NeedComputeWidth) { Parameters -> SetAttributeReal("Width_Output", Height_val * 3) } if(NeedComputeCR) { Parameters -> SetAttributeReal("CR_Output", Height_val/10) } if (output_message.Length() > 0) { Notify(output_message) } |