-
Coinciding with the acquisition of VIA Development, Nate joined Autodesk in March of 2003 after a decade stint as an entrepreneur following a two-decade stint as a controls engineer and software applications developer at Owens-Corning. Nate is now the lead product architect for AutoCAD Electrical. He loves this stuff.
-
Circuit Builder API call - incorrect argument list
June 16, 2008 10:11 PMby Nate HoltThe new Circuit Builder tool in AutoCAD Electrical 2009 can do some pretty neat things. It is pretty flexible as far as customizing it to do other than three-phase motor control circuits.
One issue that a user brought up recently was that the API call for running circuit builder without any user prompts is not documented quite right. One of the arguments is in the wrong spot.
Here is the correct documentation for the call:
ace_cb_insert FunctionDescriptionInvoke Circuit Builder and insert complete circuit without any user prompts.
Syntax(c:ace_cb_insert param_lst)
Parameterparam_lst(list xy template_dwg xls_fnam xls_sheet insckt_scl symscl rungvertdist runghorizdist history_name options)- "xy" = main template insertion coordinate, nil = user prompted to pick insertion
- "template_dwg" = main template dwg to insert
- "xls_fnam" = circuit builder XLS file, nil = default to "ace_circuit_builder.xls"
- "xls_sheet" = code sheet that corresponds to the selected template
- "insckt_scl" = main template insertion scale, nil = use drawing default
- "symscl" = component insertion scale, nil = use current default
- "rungvertdist" = spacing adjustment distance between marked horiz wires
- "runghorizdist" = spacing adjustment distance between marked vertical wires
- "history_name" = nil if no "history" reference, otherwise = previously assigned circuit name
- "options" 1's bit set=debug messages on, nil=no options selected
Example: insert 3-phase non-reversion motor starter circuit as defined in the default ace_circuit_builder.xls spreadsheet file. Insert at coordinate 5.0,23.5 on the active drawing.(c:ace_cb_insert (list "5.0,23.5,0.0" "ace_cb1_FVNR_H" nil "3PH_H" nil nil nil nil nil nil))
Example lisp expressions (entered at command prompt to illustrate what they will generate):
Command: (c:ace_cb_insert (list "5.0,23.5,0.0" "ace_cb1_FVNR_H" nil "3PH_H" nil nil 0.75 0.75 nil nil))
Command: (c:ace_cb_insert (list (getpoint) "ace_cb1_FVNR_V" nil "3PH_V" nil 1.5 1.75 0.5 nil nil))
Command: (c:ace_cb_insert (list (getpoint) "ace_cb1_FVNR_V" nil "3PH_V" nil 1.5 1.75 1.5 nil nil))