AutoLISP Program for Electrical Panel Board Selection

AutoLISP Program for Electrical Panel Board Selection

Anonymous
Not applicable
1,288 Views
8 Replies
Message 1 of 9

AutoLISP Program for Electrical Panel Board Selection

Anonymous
Not applicable

Hi,

 

Is there anyone who can help me or give me an idea on how to create a program in AUTOLISP?

I want to create a Pop-up Menu that can allow me to input my Breaker Ampere Rating for Main and Branches and also the quantity of feeders. And it can give me the layout drawings.

 

Appreciate your help, newbie here.

0 Likes
1,289 Views
8 Replies
Replies (8)
Message 2 of 9

pbejse
Mentor
Mentor

@Anonymous wrote:

Is there anyone who can help me or give me an idea on how to create a program in AUTOLISP?

I want to create a Pop-up Menu that can allow me to input my Breaker Ampere Rating for Main and Branches and also the quantity of feeders. And it can give me the layout drawings.


 

Looking for help to create the lsp on your own right?  Do you mean a dialog box where you can select the type and input values YES? 

 

Sounds exciting, tell us more @Anonymous 

 

For the meantime Check this out Tharwat Al Shoufi 

 

 

0 Likes
Message 3 of 9

Anonymous
Not applicable

yes that is the idea. I want to input values in the pop-up menu and it will automatically generate the size of box that I will use, is that even possible?

0 Likes
Message 4 of 9

pbejse
Mentor
Mentor

@Anonymous wrote:

 is that even possible?


Yes

 

0 Likes
Message 5 of 9

Anonymous
Not applicable

Can you teach me how to do that?

0 Likes
Message 6 of 9

pbejse
Mentor
Mentor

@Anonymous wrote:

Can you teach me how to do that?


AfraLISP - Learn AutoLISP for AutoCAD productivity  Start reading. 

 

0 Likes
Message 7 of 9

Sea-Haven
Mentor
Mentor

For non experienced if you just want to answer questions in a dcl box ie enter values then I have a Library routine you can have from 1 to around 20 entries, it is not hardcoded so you supply the descriptions. It returns the answers, has default values or can update once ran for next run.

 

Something like this for dcl, all descriptions by user.

screenshot327.png

 

You need to provide a lot more info about the dwg to be created.

 

The code has been posted numerous times but happy to send it to you.

0 Likes
Message 8 of 9

Anonymous
Not applicable

Thanks...Can I have the codes? I want to study it if you don't mind. 😁

0 Likes
Message 9 of 9

Sea-Haven
Mentor
Mentor

This is the no image version crawl before run, it has examples at start, you just save Multi getvals.lsp to a support directory else code the "(if (not" with full path (load "c:\\......."), the code does not have to live in your code its loaded when you run the program. The default values must be a string its to do with the dcl. So can use (rtos wid 2 0) etc

 

In this example need all values to be a real hence atof. The 5 4 is minimum 4 characters displayed, 8 7 would be 7, for like file names 20 19, or  all the same.

 

 

 

 

(if (not AH:getvalsm)(load "Multi Getvals.lsp"))
(setq ans (AH:getvalsm (list "This is heading" "Line 1" 5 4 "11" "Line2" 8 7 "22" "Line3" 8 7 "33" "Line4" 8 7 "4")))
(setq L1 (atof (nth 0 ans)) L2 (atof (nth 1 ans)) L3 (atof (nth 2 ans)) L4 (atof (nth 3 ans)))

 

 

There are others for radio buttons and toggles but play with this one first.

 

0 Likes