Macro to open a program

Macro to open a program

carlos_m_gil_p
Advocate Advocate
3,731 Views
8 Replies
Message 1 of 9

Macro to open a program

carlos_m_gil_p
Advocate
Advocate

Hello boys how are you.

I wanted to consult them, if someone can tell me how to create a macro to open an external program.

I want to create a new button and when I click on the button, I open an external program. Word, excel, paint or any external program that I need to open.

Beforehand thank you very much.
Excuse my English, I only speak Spanish.


AutoCAD 2026.1.1
Visual Studio Code 1.105.1
AutoCAD AutoLISP Extension 1.6.3
Windows 10 - 22H2 (64 bits)

0 Likes
Accepted solutions (2)
3,732 Views
8 Replies
Replies (8)
Message 2 of 9

cadffm
Consultant
Consultant

SHELL command RUN (see also acad.pgp)

or Lispfunction STARTAPP [F1] for help

Sebastian

0 Likes
Message 3 of 9

carlos_m_gil_p
Advocate
Advocate

Hi, Betreff, how are you?

I currently use the startapp function.
But I want to configure a button so I do not have to pass my lisps.

Thanks for the help.


AutoCAD 2026.1.1
Visual Studio Code 1.105.1
AutoCAD AutoLISP Extension 1.6.3
Windows 10 - 22H2 (64 bits)

0 Likes
Message 4 of 9

maratovich
Advisor
Advisor
Accepted solution
^C^C(startapp "C://Program Files//Microsoft Office//Office12//EXCEL.EXE")
---------------------------------------------------------------------
Software development
Automatic creation layouts and viewport. Batch printing drawings from model.
www.kdmsoft.net
0 Likes
Message 5 of 9

carlos_m_gil_p
Advocate
Advocate

Hello maratovich.
Thank you very much, it worked very well.

 

Another question.
Is there any way to create a shortcut button?

 

Thank you.


AutoCAD 2026.1.1
Visual Studio Code 1.105.1
AutoCAD AutoLISP Extension 1.6.3
Windows 10 - 22H2 (64 bits)

0 Likes
Message 6 of 9

maratovich
Advisor
Advisor

@carlos_m_gil_p  написал (-а):

Is there any way to create a shortcut button?

 


I did not understand what and where to create?

---------------------------------------------------------------------
Software development
Automatic creation layouts and viewport. Batch printing drawings from model.
www.kdmsoft.net
0 Likes
Message 7 of 9

carlos_m_gil_p
Advocate
Advocate

I created the button with the macro that you told me.
Now I want to know if to that button that I create, I can place a keyboard shortcut.

Excuse my English, I only speak Spanish. 😞

Thanks for your help.


AutoCAD 2026.1.1
Visual Studio Code 1.105.1
AutoCAD AutoLISP Extension 1.6.3
Windows 10 - 22H2 (64 bits)

0 Likes
Message 8 of 9

maratovich
Advisor
Advisor
Accepted solution

1.png2.png3.png4.png

---------------------------------------------------------------------
Software development
Automatic creation layouts and viewport. Batch printing drawings from model.
www.kdmsoft.net
Message 9 of 9

carlos_m_gil_p
Advocate
Advocate

Hello brother, thank you very much for your help.
Everything works very well.
Greetings.


AutoCAD 2026.1.1
Visual Studio Code 1.105.1
AutoCAD AutoLISP Extension 1.6.3
Windows 10 - 22H2 (64 bits)

0 Likes