macro to save nwcout with suffix

macro to save nwcout with suffix

Anonymous
Not applicable
822 Views
2 Replies
Message 1 of 3

macro to save nwcout with suffix

Anonymous
Not applicable

I'm trying to modify the qsave macro in both plant3d and civil3d to perform an nwcout silently using a specific set of options for nwopt and adding sufix "NWCOUT" to the same folder as the dwg

ie if file is named 123-Existing Pipe Network.dwg then the file 123-Existing Pipe Network_NWCOUT.nwc will be created in the same directory as the dwg is saved.

If its too much to set the nwopt part then just adding the suffix would do.

Any suggestions?

0 Likes
823 Views
2 Replies
Replies (2)
Message 2 of 3

doglips
Advocate
Advocate

Maybe something like:

(setq OrigFiledia (getvar "FILEDIA")

(setvar "FILEDIA" 0)
(setq DName (substr (getvar "dwgname")1 (- (strlen (getvar "dwgname"))4)))
(setq FullName (strcat (getvar "dwgprefix") DName " _NWCOUT"  ".nwc"))

(command "nwcout" FullName)

(setvar "FILEDIA" OrigFiledia)

0 Likes
Message 3 of 3

Anonymous
Not applicable

Thanks for response doglips,

I couldnt get that to work as a macro, I dont have time right now to trouble shoot, ill post in more detail what I tried in the next few days if I get a chance (project delivery looming and under the pump)

Cheers

Richard

0 Likes