Results 1 to 4 of 4

Thread: Saveas new format issue

  1. #1
    100 Club
    Join Date
    2008-11
    Location
    Fort Lewis, WA.
    Posts
    119
    Login to Give a bone
    0

    Unhappy Saveas new format issue

    Can someone please tell me what I am doing wrong or missing.
    I am trying to saveas the current file in 2000 format in the same location with the same name but adding "_version2000" at the end.

    Code:
    (defun C:GetReadyToEmail ()
    (setq fdd (getvar "filedia"))
    (command "filedia" "0")
    (setq fn(strcat (getvar "dwgprefix")(getvar"dwgname") "_version2000"))
    (command "saveas" "2000" fn)
    (command "filedia" fdd)
    )
    Any ideas?

  2. #2
    Certifiable AUGI Addict ccowgill's Avatar
    Join Date
    2004-08
    Location
    Iron Station, NC
    Posts
    3,198
    Login to Give a bone
    0

    Default Re: Saveas new format issue

    Quote Originally Posted by prose View Post
    Can someone please tell me what I am doing wrong or missing.
    I am trying to saveas the current file in 2000 format in the same location with the same name but adding "_version2000" at the end.

    Code:
    (defun C:GetReadyToEmail ()
    (setq fdd (getvar "filedia"))
    (command "filedia" "0")
    (setq fn(strcat (getvar "dwgprefix")(getvar"dwgname") "_version2000"))
    (command "saveas" "2000" fn)
    (command "filedia" fdd)
    )
    Any ideas?
    what is not working?
    do you need to trim off the .dwg from the end of the dwgname?
    Try this:
    Code:
    (vl-load-com)
    (defun C:GetReadyToEmail (/ fdd fn)
    (setq fdd (getvar "filedia"))
    (command "filedia" "0")
    (setq fn(strcat (getvar "dwgprefix")(vl-filename-base(getvar"dwgname")) "_version2000"))
    (command "saveas" "2000" fn)
    (command "filedia" fdd)
    )

  3. #3
    100 Club
    Join Date
    2008-11
    Location
    Fort Lewis, WA.
    Posts
    119
    Login to Give a bone
    0

    Default Re: Saveas new format issue

    That worked wonderfully.
    Thanks.
    The knowledge on this site never ceases to amaze me.

  4. #4
    Certifiable AUGI Addict
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    0

    Default Re: Saveas new format issue

    Just as a tip. Try not using (command ...) to set sysvars. Rather use (setvar ...). E.g. (setvar "filedia" 0) and (setvar "filedia" fdd) will do the same but won't be mirrored to the command line.

Similar Threads

  1. 2013: Setting AutoCAD to always saveas 2010 file format using 2013
    By 3D Jack in forum AutoCAD for Mac General
    Replies: 5
    Last Post: 2013-11-02, 02:11 PM
  2. Replies: 10
    Last Post: 2007-04-18, 12:59 PM
  3. Replies: 4
    Last Post: 2006-09-28, 05:40 PM
  4. Text format issue
    By dgordon.68443 in forum AutoCAD Civil 3D - General
    Replies: 5
    Last Post: 2006-08-16, 06:52 PM
  5. AutoCAD 2007 - SaveAs 2004 format.
    By b_v_mc in forum AutoCAD General
    Replies: 3
    Last Post: 2006-06-01, 05:08 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
  •