Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LISP Help Needed For SaveAs

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
elijahvoigt
425 Views, 7 Replies

LISP Help Needed For SaveAs

Hello I have written a LISP routine to help with file preparation for this certain type of software. I have to go through several commands to clean the file, then I need to export it to a ASCII R12 DXF(by selecting all objects upon save). Long story of why this works, but it does. The issue is when I try to "saveas" in my routine I don't see an exported DXF on my hard drive, but if I do it manually without the LISP it asks me if i want to overwrite the file as if it is on my hard drive. Any thoughts or advice on how I can change my LISP, or any other thoughts that might be causing this problem? Thanks in advance. File is attached.    

Civil 3D 2014
i7-3930K Overclocked
32 GB Ram
Windows 7 Professional
7 REPLIES 7
Message 2 of 8
olbapxpablo
in reply to: elijahvoigt

before taking any action have you check the folder option?
on folder press "f10" click "tools" "folder option" "view" tab then click show hidden files
Message 3 of 8
hmsilva
in reply to: elijahvoigt

'File is attached.'

 

File???

 

Henrique

EESignature

Message 4 of 8
elijahvoigt
in reply to: hmsilva

 
Civil 3D 2014
i7-3930K Overclocked
32 GB Ram
Windows 7 Professional
Message 5 of 8
elijahvoigt
in reply to: olbapxpablo

I did double check that, yes show all files is on. 

Civil 3D 2014
i7-3930K Overclocked
32 GB Ram
Windows 7 Professional
Message 6 of 8
hmsilva
in reply to: elijahvoigt

Untested...

 

(defun c:demo ()
  (command "plan" "world")
  (command "-layer" "on" "*" "")
  (command "-layer" "thaw" "*" "")
  (command "chprop" "all" "" "layer" "0" "")
  (command "-layer" "set" "0" "")
  (command "-purge" "all" "*" "no")
  (command "filedia" "0")
  (if (findfile "D:\\rename.dxf")
    (command "saveas" "dxf" "v" "r12" "o" "all" "" "" "D:\\rename.dxf" "Y")
    (command "saveas" "dxf" "v" "r12" "o" "all" "" "" "D:\\rename.dxf")
  )
  (command "filedia" "1")
  (princ)
)

 

Henrique

 

EESignature

Message 7 of 8
elijahvoigt
in reply to: hmsilva

Henrique that worked great! Thank You!

Civil 3D 2014
i7-3930K Overclocked
32 GB Ram
Windows 7 Professional
Message 8 of 8
hmsilva
in reply to: elijahvoigt

You're welcome!
Glad I could help

Henrique

EESignature

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost