modemacro startup autocad

kidznok
Advocate
Advocate

modemacro startup autocad

kidznok
Advocate
Advocate

Hi,
How can I start autocad with modemacro $(getvar,dwgname) ?
I know that I can put it in filepath but only scr for example "/b nameofscript" , but how add only modemacro command not whole script?

0 Likes
Reply
Accepted solutions (1)
399 Views
4 Replies
Replies (4)

cadffm
Consultant
Consultant
Accepted solution

You can use this way you talked about, create a *.scr file with

_.MODEMACRO<enter>
$(getvar,dwgname)<enter>

 

as content.

Or you can use  ACAD.lsp file, add

(setvar "modemacro" "$(getvar,dwgname)")

(ACAD.lsp is a userdefined file, not part of a standard installation, search for ACAD.LSP to learn more about it, if you don't know)

 

Sebastian

GrzegorzGrabowski2691
Explorer
Explorer
Thank you very much 🙂
0 Likes

kidznok
Advocate
Advocate

Thanks.
One more question - how to add this scr when I start from file not from shortcut of AC ?

0 Likes

cadffm
Consultant
Consultant

you can't

For this you should go the other way - use ACAD.lsp.

 

1. Search foir existing ACAD.lsp:

  Command: (findfile"ACAD.lsp")

 

  If you got a path, open this file and add what i wrote above.

 

  If nil, go to 2.)

 

2. Do you have your own AutoCAD Support folder for company or personal AutoCAD stuff?

    If not, create such an folder, and add a text file like your *.scr file, but this this name and extension: ACAD.lsp

    File content, look above.

    Now, add this folder as AutoCAD Supportpath to your profile.

     Command: OPTIONS, FILES tab, first node - add your folder path there and re-start AutoCAD.

Sebastian

0 Likes