How to add custom LISP commands to Icon Menu in AutoCAD Electrical?

How to add custom LISP commands to Icon Menu in AutoCAD Electrical?

schmidtjBEEVY
Advocate Advocate
1,526 Views
9 Replies
Message 1 of 10

How to add custom LISP commands to Icon Menu in AutoCAD Electrical?

schmidtjBEEVY
Advocate
Advocate

Good day everyone,

 

I was wondering how to add LISP programs to the Icon menu (I am using AutoCAD Electrical 2020). I used to work for a company that had someone who possessed this knowledge, but I have since lost contact with this individual. I tried to Google how to do it, but I must have been using the wrong keywords to get the result I was hoping for. I am hoping one of you could help me.

 

Thanks,

-JD

 

@schmidtjBEEVY 

The topic title has been edited to improve findability by @alina.balkanskaia. Original: Adding Custom LISP Commands to Icon Menu

0 Likes
Accepted solutions (1)
1,527 Views
9 Replies
Replies (9)
Message 2 of 10

james.mcmillanNYR6A
Collaborator
Collaborator

If you know how to modify the icon menu? Instead of component, do command. The command will be as required to run the lisp. The lisp will need to be loaded, not sure if you can do the loading in the same command

0 Likes
Message 3 of 10

schmidtjBEEVY
Advocate
Advocate
The insert command option--seemingly--only lets me enter premade commands from AutoCAD. I don't see an option to browse for one of my LISPs. I have also already tried to paste the address and name of one of my LISPs into the command name (like you would for a block on the component addition menu) and that doesn't do it either.
0 Likes
Message 4 of 10

james.mcmillanNYR6A
Collaborator
Collaborator

I admit I've never actually done this for just the lisp so might have given you duff advice, I have included a lisp to operate as part of an existing command (inline label), but not in front of my computer right now to provide an example, I seem to remember picking up the format from an existing example

 

You don't need to browse for the lisp, just type the command from the lisp you require eg. c:mylisp

 

 

0 Likes
Message 5 of 10

james.mcmillanNYR6A
Collaborator
Collaborator

Potentially the idea of having a button to run the lisp is unnecessary, as your only have to type the command to run it...

 

Are you looking for a command to load the lisp?

0 Likes
Message 6 of 10

schmidtjBEEVY
Advocate
Advocate
It's less for me, but to make it easier to use for the other engineers in my dept. I've been making these Q.O.L. programs so I have the commands memorized, but some of the other guys I work with aren't going to remember the auto tag program is "AT" or the save'n'close is "CC". My plan is to migrate everything to the server when its all done, including the icon menu data file so they just have to pop the new menu file into their directory and they can use the commands that way. (as opposed to referencing a "How to do the thing" email every time)
0 Likes
Message 7 of 10

schmidtjBEEVY
Advocate
Advocate
Accepted solution

So I massively overthought how to do this... 

 

After reading the documentation on how the Icon Menu uses the instruction, I just needed to put the command's name in the box without a file extension. For example, if you wanted the rectangle instruction as an icon, put rectangle in the command to execute box. Same applies for any lisp program in a trusted directory.

0 Likes
Message 8 of 10

dshood
Advocate
Advocate

We use a lisp routine file that contains multiple list files of the commands and what they do then loads them for you.

the files are completely customizable to you needs. The lisp  routine uses DCL files along with text files to run.

If you are interested I could zip them up if you are Knowledgeable enough to do some text edits.

 

Dave S.

  

0 Likes
Message 9 of 10

schmidtjBEEVY
Advocate
Advocate
I'm all set with the stuff I've been making, but thanks anyway, Dave.
0 Likes
Message 10 of 10

alina.balkanskaia
Alumni
Alumni

Hello, @schmidtjBEEVY! Thanks a lot for posting an answer and marking it as the Solution.😀

It would help other users to find the correct answer.

Alina Balkanskaia
Community Manager
0 Likes