TheSwamp

CAD Forums => CAD General => Topic started by: dubb on May 21, 2020, 04:46:29 PM

Title: dwg shortcut on different versions of AutoCAD
Post by: dubb on May 21, 2020, 04:46:29 PM
I want to create a dwg shortcut that executes a script. I can only find examples of Target strings where it needs to contain the exact location of acad.exe

Here is an example of a Target string that works.
Code: [Select]
"C:\Program Files\Autodesk\AutoCAD 2018\acad.exe" /t "\\server\cad\00_Templates\blank.dwg" /b "\\server\cad\10_CAD Support\Scripts\foo-script"
Is there a way to edit the Target string so that I don't need to define the exact location of acad.exe?

I tried this. It didn't work.
Code: [Select]
"\\server\cad\00_Templates\blank.dwg" /b "\\server\cad\10_CAD Support\Scripts\foo-script"
Title: Re: dwg shortcut on different versions of AutoCAD
Post by: ronjonp on May 21, 2020, 05:06:13 PM
Not exactly sure what you're asking but shouldn't this need the file extension to work?

"\\server\cad\10_CAD Support\Scripts\foo-script.scr"
Title: Re: dwg shortcut on different versions of AutoCAD
Post by: dubb on May 21, 2020, 05:21:18 PM
Surprisingly it works with or without the .scr file extension.

Not exactly sure what you're asking but shouldn't this need the file extension to work?

"\\server\cad\10_CAD Support\Scripts\foo-script.scr"

I was thinking about adding a cmd string to access the registry to get the default acad.exe directory followed by
Code: [Select]
/t "\\server\cad\00_Templates\blank.dwg" /b "\\server\cad\10_CAD Support\Scripts\foo-script"
Title: Re: dwg shortcut on different versions of AutoCAD
Post by: dubb on May 21, 2020, 07:07:33 PM
I tried loading the script using "command script". Still doesn't work.

Code: [Select]
"\\server\cad\00_Templates\blank.dwg" (command "SCRIPT" "\\\\server\\cad\\10_CAD Support\\Scripts\\foo-script.scr")
Title: Re: dwg shortcut on different versions of AutoCAD
Post by: ronjonp on May 22, 2020, 12:09:21 AM
Are you adding this to the autocad shortcut? Not sure where you're going with the command ?
Title: Re: dwg shortcut on different versions of AutoCAD
Post by: dubb on May 22, 2020, 01:10:48 PM
Are you adding this to the autocad shortcut? Not sure where you're going with the command ?
Its a shortcut for a dwg file. Not a shortcut for the autocad program itself.
Title: Re: dwg shortcut on different versions of AutoCAD
Post by: BIGAL on May 31, 2020, 09:18:49 PM
Start up toggles
http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%202010%20User%20Documentation/index.html?url=WS1a9193826455f5ffa23ce210c4a30acaf-79ba.htm,topicNumber=d0e13462