CAD Forums > CAD General

dwg shortcut on different versions of AutoCAD

(1/2) > >>

dubb:
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: ---"C:\Program Files\Autodesk\AutoCAD 2018\acad.exe" /t "\\server\cad\00_Templates\blank.dwg" /b "\\server\cad\10_CAD Support\Scripts\foo-script"
--- End code ---

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: ---"\\server\cad\00_Templates\blank.dwg" /b "\\server\cad\10_CAD Support\Scripts\foo-script"
--- End code ---

ronjonp:
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"

dubb:
Surprisingly it works with or without the .scr file extension.


--- Quote from: 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"

--- End quote ---

I was thinking about adding a cmd string to access the registry to get the default acad.exe directory followed by
--- Code: ---/t "\\server\cad\00_Templates\blank.dwg" /b "\\server\cad\10_CAD Support\Scripts\foo-script"
--- End code ---

dubb:
I tried loading the script using "command script". Still doesn't work.


--- Code: ---"\\server\cad\00_Templates\blank.dwg" (command "SCRIPT" "\\\\server\\cad\\10_CAD Support\\Scripts\\foo-script.scr")
--- End code ---

ronjonp:
Are you adding this to the autocad shortcut? Not sure where you're going with the command ?

Navigation

[0] Message Index

[#] Next page

Go to full version