DXFOUT File Location

DXFOUT File Location

Travis.Biddle
Advocate Advocate
663 Views
2 Replies
Message 1 of 3

DXFOUT File Location

Travis.Biddle
Advocate
Advocate

I am using the following line of code to produce DXF's of selected objects.  

 

(setq ss (ssget "w" pt1 pt2'((8 . "0") (0 . "lwpolyline"))))
(command "_.dxfout" partname "_O" ss "" "")

 

The program is working fine, but always outputs to "my documents" which isnt a huge problem.  BUT, when I try this program on a co-workers machine it is trying to export to "C:windows/System 32" which isnt allowed.  Not sure if its a windows thing or corporate security settings (LOL).  It seems to be pulling the  "system 32" location from the "look in" locations (open dialog box and under tools in the upper right corner).  

 

Is here a way to set the output file location for DXFOUT? 

0 Likes
Accepted solutions (1)
664 Views
2 Replies
Replies (2)
Message 2 of 3

pendean
Community Legend
Community Legend
You just need to enter/identify the folder you want between "_.dxfout" and partname in your LISP instead of hoping a default is always going to be correct.

Are you aiming for the source DWG file's folder? then use the DWGPREFIX variable, usage explained in HELP.

HTH
0 Likes
Message 3 of 3

Travis.Biddle
Advocate
Advocate
Accepted solution

I tried that, but placing it inbetween "._DXFOUT" and partname did not work.  I used this code

 

set veriable for dwgprefix using.....

(setq folder (getvar "dwgprefix"))

 

then..

 

(setq ss (ssget "w" pt1 pt2'((8 . "0") (0 . "lwpolyline")))) 
(command "_.dxfout" folder partname "_O" ss "" "")

 

 

EDIT:  I got it figured out

0 Likes