Jump to content

Script Writer


Lee Mac

Recommended Posts

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'?

Link to comment
Share on other sites

  • 6 years later...
  • Replies 46
  • Created
  • Last Reply

Top Posters In This Topic

  • Lee Mac

    21

  • asos2000

    8

  • The Buzzard

    5

  • jgmechengr19

    4

Top Posters In This Topic

Posted Images

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.

leemacVLIDE.jpg

Link to comment
Share on other sites

@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

 

  1. Open the file
  2. Wildcard all files in chosen directory.
  3. Save file as (options menu changed saveas default to dxf)
  4. Type of DXF to use (std DXF)
  5. 16 for resolution
  6. *Wildcard new file name
  7. 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.

  1. The file saves as C://filename.dwg.dxf with 2 extensions (keeps the dwg in the name)
  2. 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).

lottaTabs.dwg.dxf.jpg

Link to comment
Share on other sites

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 by Roy_043
spelling...
Link to comment
Share on other sites

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".

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...