Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AutoCAD Electrical 2011 Lisp script for inserting ladders

4 REPLIES 4
Reply
Message 1 of 5
sethtriad
1371 Views, 4 Replies

AutoCAD Electrical 2011 Lisp script for inserting ladders

Is it possible within ACADE 2011 to use a lisp command to create a ladder with a set spacing, ladder # scheme, and rung spacing?

 

Typing AELADDER into the command line brings up the dialogue box where you can fill out the above information, but typing (command "AELADDER") returns an error. I'm not sure if that error is because it doesn't recognize it, or if it's becuase I don't have any variables after "AELADDER".

4 REPLIES 4
Message 2 of 5
Kent1Cooper
in reply to: sethtriad


@sethtriad wrote:

Is it possible within ACADE 2011 to use a lisp command to create a ladder with a set spacing, ladder # scheme, and rung spacing?

 

Typing AELADDER into the command line brings up the dialogue box where you can fill out the above information, but typing (command "AELADDER") returns an error. I'm not sure if that error is because it doesn't recognize it, or if it's becuase I don't have any variables after "AELADDER".


I don't have Electrical, but the (command) function recognizes only the names of native AutoCAD commands, not those that are specialty functions in overlays, or user-defined commands.  In case that's defined similarly to a user-defined (defun C:WHATEVER () ....  command, try invoking it this way:

 

(C:AELADDER)

 

By the way, if what you mean by "ladder" is what I've usually heard called a "cable tray," take a look at this thread .  It doesn't work from a dialog box, and I guess it's not likely to be better than AELADDER, but you never know -- for example, it remembers all your option choices and offers them as defaults on subsequent uses, which many AutoCAD commands don't do [I couldn't say about AELADDER].

Kent Cooper, AIA
Message 3 of 5
sethtriad
in reply to: Kent1Cooper

Typing (C: AELADDER) brings up the dialogue box for the ladder command, which is a start!

 

A ladder is for schematic diagrams of electrical connections between power sources and different devices. For DC power, imagine a ladder with two vertical supports and 10 horizontal rungs, the support on the left represents V+, and the support on the right represents GND. For AC, there are three supports, one for V+, one for Neutral, and the third for GND.

 

When running the ladder command, a dialogue box opens where I need to specify if the ladder is 2 or 3 phase (dc or ac), the spacing of the "supports", the distance between rungs, and the numbering of the rungs. 

Message 4 of 5
Kent1Cooper
in reply to: sethtriad


@sethtriad wrote:

Typing (C: AELADDER) brings up the dialogue box for the ladder command, which is a start!

 

A ladder is for schematic diagrams of electrical connections between power sources and different devices. For DC power, imagine a ladder with two vertical supports and 10 horizontal rungs, the support on the left represents V+, and the support on the right represents GND. For AC, there are three supports, one for V+, one for Neutral, and the third for GND.

 

When running the ladder command, a dialogue box opens where I need to specify if the ladder is 2 or 3 phase (dc or ac), the spacing of the "supports", the distance between rungs, and the numbering of the rungs. 


Well, that reminds me of something from a while back....  You might be interested in at least looking into Ladder.lsp with its Ladder command, on this thread.  [The one in Message 11 works only in 2D; the one in Message 14 works in 2D or in 3D, which I can't imagine you would need.]  But they're not dialog-box-based, so AELADDER is likely easier to use.  However, if you've got some of those answers already determined in variables or something, and you can't find a way to feed them into AELADDER in Lisp, either of those could easily be edited to take those answers and incorporate them.  And either could be edited to draw 3 "rail" lines instead of 2, or to have the option.

Kent Cooper, AIA
Message 5 of 5
sethtriad
in reply to: Kent1Cooper

Interesting stuff; however, we can't use lines because things would get messy. 

 

Using the ladder command, Autocad knows where devices are and can automatically reference things to each other, when applicable. For instance, if there is a relay contact on page 1 that is controlled by the relay coil on page 100, autocad will automatically add a reference number to each component telling the electrician where the other part is located in the package. If the ladder command wasn't used, we'd have to go through every drawing and find the corresponding component. Using the ladder command makes things run much smoother. 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost