Results 1 to 2 of 2

Thread: ExportToAutocad: Stop Prompts to Overwrite File?!

  1. #1
    Woo! Hoo! my 1st post
    Join Date
    Vancouver, Wa
    Login to Give a bone

    Default ExportToAutocad: Stop Prompts to Overwrite File?!

    I'm am attempting to export models from Plant 3D using ExportToAutoCAD. However, I don't want to be prompted as to whether I want to overwrite, I just want it to save these files out, whether the file exists or not.

    My lisp skills are sorely lacking but I thought I might try this statement, but my syntax is incorrect:

    ((if(findfile DWGN2))(command "-EXPORTTOAUTOCAD" "2010" DWGN2 "y")(command "-EXPORTTOAUTOCAD" "2010" DWGN2))

    What is the correct way to write this?

    There is probably much better way to accomplish this task so any help would be much appreciated!

    Last edited by C4d_M4n; 2012-05-01 at 04:55 PM.

  2. #2
    Certifiable AUGI Addict irneb's Avatar
    Join Date
    Jo'burg SA
    Login to Give a bone

    Default Re: ExportToAutocad: Stop Prompts to Overwrite File?!

    You could issue the command, then check if a command is still active. E.g. (untested):
    (command "EXPORTTOAUTOCAD" "2010" DWGN2)
    (while (> (getvar 'CmdActive) 0) (command "YES"))
    Alternatively you could check if the file already exists, then use vl-file-delete to delete it before exporting.

    BTW, your code has some extra parenthesis: e.g.
    ((if(findfile DWGN2)) ...
    Thus the if statement returns a T and that is then interpreted as a function to be called. The T is not a function and would produce an error.
    Knowledge is proportional to experience, but wisdom is inversely proportional to ego!
    My little bit of "wisdom": Hind-sight is useless, unless used to improve the next forethought!

Similar Threads

  1. 2010: MEP Hidden Lines stop working in file (2010)
    By klee323523 in forum AMEP General
    Replies: 2
    Last Post: 2013-03-21, 12:43 PM
  2. Stop Telling me file needs to be saved
    By kspear in forum Civil 3D Wish List
    Replies: 1
    Last Post: 2012-02-20, 04:23 AM
  3. Inserting blocks and pesky shape file prompts
    By jgratton in forum AutoCAD General
    Replies: 1
    Last Post: 2010-03-19, 03:37 PM
  4. Exporttoautocad not available
    By todd.80290 in forum AutoCAD Civil 3D - General
    Replies: 5
    Last Post: 2009-01-20, 06:55 PM
  5. Keywords in prompts for Block Attribute Prompts.
    By acadwishlist in forum AutoCAD Wish List
    Replies: 0
    Last Post: 2009-01-13, 04:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts