-
Script for NWCOUT
I´m trying to make a script for NWCOUT-exports but can´t get it to work??
In the script the only text should be NWCOUT followd by two ENTER, or?? when i write it in a open drawing it works to write Nwcout and strike ENTER two times, but not when im writeing it in a scriptfile....... Please help me :-)
-
Re: Script for NWCOUT
Could you show what happens if you run the SCR file through a normal SCRIPT command? (instead of through a batch). Do this in order to see any error messages on the command-line.
BTW, I'm unfamiliar with the NWCOUT command. Is it an addon? If so it might need loading before calling it - the normal autoloads don't always work well when using batch scripting.
-
Re: Script for NWCOUT
There is no error message on the command-line, thats the problem..... when i have the drawing open and write NWCOUT autocad wants to know were to save the NWC-file, and because it suggests the same folder that the drawing is in i only have to hit enter to make it save the NWC-file there as well. But with the script it is like it´s one Enter to much, because autocad askes one more time (after the file i made) were to save the file and because there already is a nwc-file there with the same name there is probblems.....
NWCOUT is a command to make NWC-files for Navisworks, for 2012 and 2013 you have to download Autodesk Navisworks NWC Export Utility, http://usa.autodesk.com/adsk/servlet...&siteID=123112
The problem is not that it doesen´t call it, it´s as i said that one extra enter........
-
Re: Script for NWCOUT
OK, understood. There are several things which might cause this, e.g. the FileDia is ignored (or should be) during a script. I.e. all dialog boxes "should" change to their command-line equivalents.
Also remember the end-of-line just after the NWCOUT is also considered an Enter: Thus the following should send 2 enters:
Code:
Line 1: NWCOUT
Line 2:
For the file already nexisting, you might want to go the lisp route. Check the CmdActive system variable to see if the NWCOUT command has completed, else sent an "enter". Or you can use lisp to erase the file if it exists before starting NWCOUT.