Compute the Geometry for Parametric Part

An opening ID is an entry point used to customize business logic. Compute the Geometry for Parametric Part allows you to change the port attribute geometry and provides the available values.

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 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.

PLM Opening ID:
Customization intent: Computation
Execution context: Client

Input Objects

Input objects must be of the following types:

  • ThisObject: product occurrence
  • Parameters corresponds to the context object.

Sample

The 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) 
}