Jump to content

SaveAs New Name


chomuth

Recommended Posts

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

Link to comment
Share on other sites

You pretty much had it, nice one:

 

(vl-load-COM)
(vla-SaveAs (vla-get-ActiveDocument
             (vlax-get-acad-object))

 (strcat (getvar "DWGPREFIX") "plot_" (getvar "DWGNAME"))

 ac2000_dwg)


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...