I came up with a way to replace the AELADDER command in AutoCAD Electrical, and completely automate the ladder insertion portion of our schematics, as they have the same spots virtually every time.
I ran into a problem where my second ladder is giving me issues with the AutoCAD Electrical functionality.
So my question is this, has anyone come up with a way to automate the AELADDER command for AutoCAD Electrical?
Or so i may be able to get it working again on my own, can someone help with a way to select one of two blocks on a drawing that have exactly the same name, but are across the drawing from each other?
--Thanks in advanced.
I have found a good way if you know how to use the "BlackBoard" Here's a little bit of code that will show you what i did:
(setq page_counter 1) ;;sets first number @1
(vl-bb-set 'page_counter page_counter) ;;stores it globally
;api command
(c:wd_in_ladder 1 (list 1.0 21.5 0.0) nil 20.5 "H" 10.0 0.5 nil 1 nil -1 (itoa (vl-bb-ref 'page_counter)) 2);;;you may need to look up this api command in the help section for the different options this is just what i use
Then after that, at the end of your lisp you need to have the following line:
(setq page_counter (+ XX page_counter));; where XX is how many rung numbers you want to use
;;Then
(vl-bb-set 'page_counter page_counter);; this stores the next starting number for the next page
If you need a little more guidance let me know