Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

modemacro startup autocad

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
kidznok
397 Views, 4 Replies

modemacro startup autocad

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?

4 REPLIES 4
Message 2 of 5
cadffm
in reply to: kidznok

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

Message 3 of 5

Thank you very much 🙂
Message 4 of 5
kidznok
in reply to: cadffm

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

Message 5 of 5
cadffm
in reply to: kidznok

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

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

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report