Are there any examples of Calculated Attributes for CAD files?
When I create a new attribute, I see the option, Calculated. How can I use it?
Answer
The Calculated attribute value is not used to perform calculations with existing WebCenter attributes or other values. Calculated attributes are attributes that are filled out by ArtiosCAD and can be displayed in WebCenter. In order to calculate these values, the file first needs to be saved in ArtiosCAD. The formula that needs to be configured is an ArtiosCAD specific formula.
To find the formula you need, try adding Calculated Text to an ArtiosCAD design. In the Calculated expressions catalog, you can find many expressions to use. The Expression you see when editing the Properties of a Calculated Text may be used in WebCenter Calculated attributes.
For more information about Calculated Text, read Adding calculated text in the ArtiosCAD User Guide.
Examples
Listed below are a few examples. In the Calculated field column, you see the value that needs to be entered in the Calculated field when defining the attribute. In the Result column, the result of the calculation.
Calculated field
Result
L
Length (in case a standard has been used).
CAL
Caliper of the board that is used for the design.
#UNIT$
Current units as inches or millimeters.
#MANSIZEX*#MANSIZEY
Gross Blank Area (Blank Size X multiplied with Blank Size Y).
Since WebCenter 14.0, you can also combine one or more Calculated attributes with a regular attribute and a JavaScriptButton to calculate certain values in WebCenter. In the example below, the attributes L, W and D are Calculated attributes that are automatically populated by ArtiosCAD. The attribute LxWxD however, is a regular WebCenter prompted attribute. The button Calculate has been added to calculate: L * W * D.
The image given below shows the JavaScript snippet that is used to calculate LxWxD: att['LxWxD'] = att['L'] * att['W'] * att['D'].
For more information about the JavaScript button, read Create JavaScript button in the WebCenter User Documentation.