Lee Mac Posted July 22, 2010 Author Share Posted July 22, 2010 To use the program, imagine you are writing a normal script, but, everytime you would usually write the filename, just write *file* and my program will write the rest of the script for you. What is this 'ambom'? Quote Link to comment Share on other sites More sharing options...
jgmechengr19 Posted December 5, 2016 Share Posted December 5, 2016 Lee Mac, I just sent you an email regarding this as well, but this is just in case someone else might have an idea what is wrong, since I don't think it is an issue with scriptwriter, but with my ACAD settings. Issue: The script only runs on the first dwg and then stops. My script in scriptwriter: _.open *file* _.saveas dxf 16 _.close no (where 16 is resolution of dxf, and no after close is if I want to save the dwg as well) The produced script as seen from VLIDE: (also, see attached image) _.open "C:\johng\CAD\LeeMacFrom\1018269-AG1.dwg" _.saveas dxf 16 _.close no yes _.open "C:\johng\CAD\LeeMacFrom\1124159-KAI.dwg" _.saveas dxf 16 _.close no yes _.open "C:\johng\CAD\LeeMacFrom\1149118-1.dwg" _.saveas dxf 16 _.close no yes Scriptwriter seems to stop after running through one time. Quote Link to comment Share on other sites More sharing options...
Roy_043 Posted December 5, 2016 Share Posted December 5, 2016 @jgmechengr19: Enter this in the Command Bar and then look carefully at the prompts: (command "_.saveas") Quote Link to comment Share on other sites More sharing options...
jgmechengr19 Posted December 5, 2016 Share Posted December 5, 2016 @jgmechengr19: Enter this in the Command Bar and then look carefully at the prompts: (command "_.saveas") This is basically how I trouble shot the script text. (below) _.open *file* _.saveas dxf 16 *file* _.close no Open the file Wildcard all files in chosen directory. Save file as (options menu changed saveas default to dxf) Type of DXF to use (std DXF) 16 for resolution *Wildcard new file name Close file The script does work, but only on the first file and then stops. I just realized through trouble shooting that the _.close command is closing the file and killing the wscript operation. I left "_.close" "no" off of the wscript and everything worked fine, minus a couple exceptions. The file saves as C://filename.dwg.dxf with 2 extensions (keeps the dwg in the name) Since "_.close" was removed, all of the tabs for the files are left open, which means you have to manually click "no" to save dwg version. Making progress, but still a couple bugs.. Closing the current screen in the script seems to kill the process. Also, need to figure out how to remove .dwg before adding .dxf for the file extension, so files aren't named "drawing1.dwg.dxf (this is not a huge issue, but would make the whole process cleaner). Quote Link to comment Share on other sites More sharing options...
Roy_043 Posted December 6, 2016 Share Posted December 6, 2016 (edited) In your list there is no 8th item after "Close file", so I don't understand why you include "no" here: _.open *file* _.saveas dxf 16 *file* _.close no Edited December 6, 2016 by Roy_043 spelling... Quote Link to comment Share on other sites More sharing options...
jgmechengr19 Posted December 6, 2016 Share Posted December 6, 2016 When you close a .DXF file, it prompts you to whether or not you would like to save the file in the drawing (.dwg) format. Since there were no changes to the drawing, I chose "no". Quote Link to comment Share on other sites More sharing options...
jgmechengr19 Posted December 6, 2016 Share Posted December 6, 2016 If you don't include "no" it will still ask, and then I believe it breaks off of the scriptwriter process.. The scriptwriter is running from the first file, so I don't know why closing the second tab would stop the process from the first tab. Everything works if you just get rid of close, and then you can just close autocad and press the "no" button 100 times until it is all shutdown.. This is the best I have come up with so far, and may just have to go with it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.