When a motor circuit is selected, a special motor setup/annotation function is called. This special function is flagged by a marker block on the template with a CODE value which maps to a line in the circuit codes sheet marked "!MCC_CTRL" in the UI_TITLE field. This function references the ace_electrical_standards.mdb file to determine full load current and wire size values for a selected set of motor input parameters.
The values generated by this motor setup/annotation function are not automatically written to attributes on the components or wire types on the circuit. These values are saved as an indexed list in an AutoLISP global variable called “#data”. Global means that the data is saved in memory and is available while the Circuit Builder continues to construct the circuit. As Circuit Builder processes subsequent marker blocks of the circuit, it can be set up to pull one or more of these saved values from the global and push them out to attributes on the components or used to format appropriate wiretype layer names
This motor setup/annotation must be flagged to happen early on. It is done with an ORDER value which is set to a low number or 0. For example, if the motor full load amps value is used to determine the main disconnect circuit breaker sizing, this data must be in memory before the main disconnecting means marker block is processed.
The elements in the first sublist of the "#data" list are held in memory in the following order. The values related to the motor are held in the first eight elements. See the API documentation for a complete list of elements.
There are two ways to map these values to the attributes on a component.
There can be multiple selections within the group. For example, there is a selection for the type of disconnecting means, and a selection to include an auxiliary contact. Each selection is assigned a numerical value from the UI_VAL field. The values are added to determine the appropriate action for this combination of selections. The sum is matched to a value in the UI_SEL field. Once this match is made, the COMMAND_LIST value, ANNOTATE_LIST value, and so on, are used to insert and annotate the selections.
Before and after are shown:
Before:(c:ace_cb_insym #xyz nil "HMO13" #scl 8 nil)
After:(c:ace_cb_insym #xyz nil "HMO13" #scl 8 “RATING2=HP: @1@”)