Results 1 to 2 of 2

Thread: ExportToAutocad: Stop Prompts to Overwrite File?!

  1. #1
    Woo! Hoo! my 1st post
    Join Date
    2010-04
    Location
    Vancouver, Wa
    Posts
    1
    0 Did you find this post helpful? Yes

    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!

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

  2. #2
    Certifiable AUGI Addict irneb's Avatar
    Join Date
    2007-07
    Location
    Jo'burg SA
    Posts
    4,492
    0 Did you find this post helpful? Yes

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

    You could issue the command, then check if a command is still active. E.g. (untested):
    Code:
    (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.
    Code:
    ((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. Stop Telling me file needs to be saved
    By kspear in forum Civil 3D Wish List
    Replies: 1
    Last Post: 2012-02-20, 03:23 AM
  2. Inserting blocks and pesky shape file prompts
    By jgratton in forum AutoCAD General
    Replies: 1
    Last Post: 2010-03-19, 03:37 PM
  3. Exporttoautocad not available
    By todd.80290 in forum AutoCAD Civil 3D - General
    Replies: 5
    Last Post: 2009-01-20, 05:55 PM
  4. Keywords in prompts for Block Attribute Prompts.
    By acadwishlist in forum AutoCAD Wish List
    Replies: 0
    Last Post: 2009-01-13, 03:21 PM
  5. Using -exporttoautocad eliminates page setups
    By wpowell in forum AutoCAD General
    Replies: 4
    Last Post: 2008-06-05, 04:35 AM

Posting Permissions

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