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

Bat file that opens dwg in already opened cad, runs scrip then closes dwg

5 REPLIES 5
Reply
Message 1 of 6
Engeny_Civil
691 Views, 5 Replies

Bat file that opens dwg in already opened cad, runs scrip then closes dwg

Hi, I am currently using a simple bat file that opens acad.exe (new version of cad), opens a specific dwg then runs a script. This works well but is a little time consuming as it has to open up a new version of cad when ever the bat file is run.

 

Does anyone have any ideas on how it can be changed to open up the specific drawing inside the already opened autocad, run the script then exit?

 

"C:\Program Files\Autodesk\AutoCAD 2019\acad.exe" /product ACAD /language "en-US" "..\..\AutoCad\Xrefs\X-CONTROL OPTION 5.dwg" /b "W:\12_CAD standard\Scripts\Annotative_Control_Line_Output_V2.scr"
EXIT

 

Thanks

Labels (4)
5 REPLIES 5
Message 2 of 6
Kent1Cooper
in reply to: Engeny_Civil

I haven't used it, but I think SCRIPTPRO works that way.  See >here<.

Kent Cooper, AIA
Message 3 of 6
JTBWorld
in reply to: Engeny_Civil

A quicker way to batch process is with the use of AutoCAD Core Console. Our JTB SmartBatch supports it. 


Jimmy Bergmark
JTB World - Software development and consulting for CAD and license usage reports
https://jtbworld.com

Message 4 of 6
Engeny_Civil
in reply to: Engeny_Civil

Thanks for the replies but the bat file needs to run by itself. Script pro is good but requires more manual input then what i am looking for.

Message 5 of 6
pendean
in reply to: Engeny_Civil

>>>...but requires more manual input...<<<
you mean your BAT file that is calling a very specific single file is somehow automatically generated without user input?

Q: why isn't your script SCR file opening and closing files for you? That's the way to do it.
Otherwise you'll just need to create a stack of BAT files that do what you want.
Message 6 of 6
Engeny_Civil
in reply to: Engeny_Civil

No, the file is named the same in every job and the file path is relative for that reason.

 

Even if we use a script to open the file we have the same problem of AutoCad opening a new version of itself rather then a new drawing.

 

For more background info, we use 12d for all the design and cad for the drafting. Currently i have set it up so all design strings, control lines, contours, long sections, cross sections and typical sections are automatically output with one button.

 

inside 12d there is a command that runs the bat file which opens can and runs the script.

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