Code Generator allows you to automatically generate and assign UserName, PartNumber and Description according to variables related to the model, so that the edit of the model even the Name, PartNumber and Description will be updated to the new value.
In the upper left there are four icons to load and save a configuration, set the current rules as defaults and remove any predefined settings, just below four text fields in which to write the data generation rules, while on the left the buttons with the label, which when pressed show a preview of the assigned value.
at the bottom of dialog box, there are two tabs:
Variables Tab, defines variables to be used to compose the User Name, PartName and Description.
Variable - name to be assigned variable
Get from - data from which to take the value
Name - the possible name of the data if available
ex. for Parameter Value, the name of the Parameter
ex. for weight you can choose the type of measurement Kgglboz
ex. for sizebox length and width, SM_Unfold returns the L and W dimension of the unfolded sheet metal part
Dec. - number of decimal to consider
Len. - length of the field (-1 undefined)
Fill Chr - fill with this character (if Len.> 1)
Value - value found by Get From
Variables available in Column Get From:
Variables Type:
returns:
option Name:
CustomData Value
value of the CustomData
the name of the CustomData contained in the element
User Name
name of the element
Sizebox Height of Element
total height of the element
Sizebox Length of Element
total length of the element
SM_Unfoldreturns the L dimension of the unfolded sheet metal
Sizebox Width of Element
total width of the element
SM_Unfoldreturns the W dimension of the unfolded sheet metal
Thickness of SheetMetal
thickness value of sheet metal
Weight of Element
weight value of the element
type of measurement Kgglboz
Weight of Element in Water
weight value of the element in water
type of measurement Kgglboz
Parameter Value
parameter value
name of the Parameter contained in the element
Volume of Element
volume value of the element
Shell Feature
thickness value of the shelled part
Thickness of IPROSteel
thickness value of steels that have this property
Code of SheetMetal
sheet metal code value
Part Number
part number of the element
Description
description of the element
Sweep Path or Extrusion Section Length
value of the length of the guide curve (3D curve or 2D sketch) of the sweep
3D Curve Length
value of the length of the 3D curve
Document Properties
file property value
name of the Properties contained in the file
Element Surface
surface value of all faces of the part
Global Position X
X value of the absolute position
Global Position Y
Y value of the absolute position
Global Position Z
Z value of the absolute position
Longest Value of Sizebox
the longest value (among L W H) of the sizebox
Number of Items
number of linked elements (both internal and external)
CustomData Tab, which defines the CustomData to add to the element and how to generate them.
Name - name to be assign to the CustomData
Expression - rule to define the value to be assigned to the CustomData
Value - value generated by rule and placed in the CustomData
Example of custom data get from expressions.
For edit the Code Generator, right clic on the part and select Open Codification dialog…
Example of construction of user name, part number and description.