Overwrite file using DXFOut

Overwrite file using DXFOut

spencer
Advocate Advocate
284 Views
3 Replies
Message 1 of 4

Overwrite file using DXFOut

spencer
Advocate
Advocate

I'm not very familiar with LISP, but I've got one part of a routine that is simply not working. I've spent a while searching online and keep seeing the same 3 answers over and over again but I can't get them to work.

 

What I'm trying to do is at the end of this routing, do a DXFOut on the open document and overwrite the existing file

My current code is

;(command "_.dxfout" (getfiled "DXF File:" (getvar "dwgprefix") "dxf" 1) "_Objects" (ssget) "" "_Version" "2018" "")
  (command "_.dxfout" (getfiled "DXF File:" (getvar "dwgprefix") "dxf" 1) (getvar "dwgname") "_Objects" (ssget) "" "_Version" "2018" "")

 I don't know if the (getvar "dwgname") is needed, because when I run this code it pops up a dialogbox asking for save location, even if I force FILEDIA to 0 before running the command

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

paullimapa
Mentor
Mentor
Accepted solution

Maybe try _+Saveas command which gives you dxf option 

https://www.cadforum.cz/en/command.asp?cmd=%2BSAVEAS#:~:text=Complete%20list%20of%20all%20AutoCAD%20....


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 3 of 4

spencer
Advocate
Advocate
I think I've got it, just had to fumble through the syntax for a while.
Thanks
0 Likes
Message 4 of 4

paullimapa
Mentor
Mentor

glad you figured it out...cheers!!!


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes