How to Round Off Values After Decimal For Support Co-ordinates


  
 Applies To 
  
 Product(s): OpenPlant Isometrics Manager
 Version(s):08.11.09.404 & above
 Environment: Windows 7 64 bit & Others
 Area: Settings/Attributes
 Subarea: 
 Original Author:Rahul Kumar, Bentley Product Advantage Group
  

To round off Support co-ordinates after decimal point in OpenPlant Isometrics Manager.

Background

While labeling the support co-ordinates in OpenPlant Isometrics Manager, values displayed with multiple numeric after the decimal point. It has been required to have the control with specific count after decimal. Below are the steps to achieve the desired settings.

Steps to Accomplish

  1.  In Class Editor, Open ‘OpenPlant_3D.01.04.ecschema.xml’ schema and supplement it with ‘OpenPlant_3D_Supplemental_Isometrics_Isoextractor.01.04.ecschema.xml’ Schema.

  2. To add a Specific BOM Labels custom attribute on a Support Class an easiest way to do so is to copy it from some other class, say PIPE_BEND which already has it. See images below.







  3. Edit this custom attribute on Support class. Delete old entries.
  4. Add a new one for coord labels: SUP_COORD_LABEL.
  5. For a values use this expression: "X: " & System.Math.Round(this.SUPPORT_POINT_X,0) & "$Y: " & System.Math.Round(this.SUPPORT_POINT_Y,0) & "$Z: " & System.Math.Round(this.SUPPORT_POINT_Z,0). See image below:



  6. Edit the Labels, use $( SUP_COORD_LABEL) as a text value for user note on supports.



  7. Run the isometrics, see the coordinate output. If required you can modify label note, let’s say use EL instead of Z or any other letters instead of X/Y, like it is set for users default OPIM style.
    Notes:
    1. The “$” symbol in the BOM label value text adds a new line in the note itself.
    2. For Math.Round function, second attribute is defining how much round off values desired, Setting value as ‘0’ would leave no values after a decimal point. In case of precise value, use other integers.
  8. See results below:



Check Another Case - Round Off Angle

User wanted to display Bend Angle information with one value after decimal, rounding the values appears to be. Using the similar expression under "Specific BOM labels" custom attribute will aid user to achieve the desired settings. Below has been described in case of Pipe Bend class used while modeling and Angle associated with it. 

           

Steps to Accomplish

  1.  In Class Editor, Open ‘OpenPlant_3D_Supplemental_Isometrics_Isoextractor.01.04.ecschema.xml’ Schema.

  2. Navigate to desired class "PIPE_BEND". 

  3. Check Custom Attrribute "Specific BOM Labels". Add Name and Value to it. See image below.

    Name - IE_BANGLE
    Value - System.Math.Round(this.ANGLE,1)



    Note - 0, 1, 2 is the precision value user can set to achieve. Also user may modify first attribute instead of creating a new entry(OPTIONAL).


  4. Open Isometrics Configuration and modify labels like shown in below image. R=$(BRADIUS)$$(IE_BANGLE)°



  5. Save & Close the configuration dialog. 

  6. Generate Isometrics & verify results.

See Also
 communities.bentley.com/.../13379.enabling-annotation-of-support-co-ordinates-in-the-isometrics

Comments or Corrections?

Bentley's Product Advantage Group requests that you please confine any comments you have on this Wiki entry to this Comments or Corrections?" section. THANK YOU!