+ Reply to Thread
Results 1 to 5 of 5

Thread: SaveAs New Name

  1. #1
    Forum Newbie
    Using
    Map 3D 2010
    Join Date
    Feb 2010
    Posts
    8

    Default SaveAs New Name

    Registered forum members do not see this ad.

    Thanks in Advance I am New to this forum

    I need to save a file with the same name but add something like Plot_ at the beginning of the name also saved in an older version

    Problem: To view certain elements in AutoCad 2010 that were creaed in Civil3d 2010, I had to save the file in an older version of Autocad. I saved it as AutoCad 2000 it seemed to work.

    So if the design Engineer can save thier drawing and also at the same time save a copy with the same name but have Plot in front of the DWGNAME

    This below works but saved file is Hard Coded in it.

    (vl-load-COM)
    (vla-SaveAs (vla-get-ActiveDocument(vlax-get-acad-object)) "test1.dwg" ac2000_dwg)

    Correct me if I am wrong. DONT ANYONE LAUGH (Outloud that is
    I need to get the DWGNAME
    Maybe through getvar
    (setq name (getvar "DWGNAME"))
    (setq plot "plot_")
    strcat these together some how
    and place in this code
    (vl-load-COM)
    (vla-SaveAs (vla-get-ActiveDocument(vlax-get-acad-object)) "test1.dwg" ac2000_dwg)

    Does anyone have a complete answer?
    Thanks Again
    A Newb to Lisp

  2. #2
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    15,743

    Default

    You pretty much had it, nice one:

    Code:
    (vl-load-COM)
    (vla-SaveAs (vla-get-ActiveDocument
                  (vlax-get-acad-object))
    
      (strcat (getvar "DWGPREFIX") "plot_" (getvar "DWGNAME"))
    
      ac2000_dwg)
    Lee Mac Programming

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

    Just another Swamper

  3. #3
    Forum Newbie
    Using
    Map 3D 2010
    Join Date
    Feb 2010
    Posts
    8

    Default

    That is Perfect.

  4. #4
    Forum Newbie
    Using
    Map 3D 2010
    Join Date
    Feb 2010
    Posts
    8

    Default

    Thank You so much

  5. #5
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    15,743

    Default

    Registered forum members do not see this ad.

    Quote Originally Posted by chomuth View Post
    Thank You so much
    No worries, you did most of it
    Lee Mac Programming

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

    Just another Swamper

Similar Threads

  1. Saveas
    By FazBear in forum AutoLISP, Visual LISP & DCL
    Replies: 1
    Last Post: 30th May 2009, 12:07 pm
  2. Saveas dwgname_rev1
    By jbergoon in forum AutoLISP, Visual LISP & DCL
    Replies: 1
    Last Post: 8th Aug 2008, 10:05 pm
  3. SaveAs() VBA function
    By opelit in forum AutoLISP, Visual LISP & DCL
    Replies: 0
    Last Post: 28th Nov 2006, 02:41 pm
  4. Saveas - dated folder
    By AWOL in forum AutoLISP, Visual LISP & DCL
    Replies: 1
    Last Post: 13th Apr 2005, 07:15 pm
  5. SaveAs Dwg in an earlier version
    By Maurice Williams in forum AutoCAD Drawing Management & Output
    Replies: 12
    Last Post: 28th Jun 2004, 11:32 pm

Bookmarks

Posting Permissions

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