Circuit Builder: To Assign Attribute Values Using AutoLISP

An AutoLISP expression can be used to define a calculated or special value for an attribute on a component. For example, you can calculate related values such as Kilowatt (KW) based upon a selected horsepower value.

See the To Map Motor Parameters to the Motor Symbol Attributes topic to map the entered horsepower.

  1. Open the circuit template drawing that contains the marker block for the motor symbol.
  2. Find the correct marker block for the motor symbol.
  3. Edit its MISC1 attribute value using the format “{attribute name}=(AutoLISP expression). For example, convert the HP value to Kilowatts and push this value out to attribute RATING5 on the motor symbol. Enter this expression on the MISC1 attribute of the marker block:

    RATING5=(rtos (* @1@ 0.746) 2 2)

    The "@1@" maps to the second entry (list is zero based) held in the #data global variable, which is the entered horsepower value. Multiplying by 0.746 converts the horsepower (HP) to Kilowatts (KW).

    Note: The MISC1 attribute value can contain multiple special text flags which direct Circuit Builder to handle the component or underlying wire in a special way. When you add new values, do not overwrite any other special flag values. Separate each one with a semicolon.
  4. Save the circuit template drawing.