Code Generator

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

Code Generator

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 Kg g lb oz
    • 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

Code Generator - Get From

Variables available in Column Get From:

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.

Code Generator CustomData

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.

Code Generator Anim