Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is there a way to force wblock method to save as a previous version?

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
1399 Views, 4 Replies

Is there a way to force wblock method to save as a previous version?

I am using Autocad 2013, and need to have lisp wblock to a 2010 format file.  Is there a way I can force it to, without the trouble of opening the file dialog box and setting the format there?

4 REPLIES 4
Message 2 of 5
phanaem
in reply to: Anonymous

This may help you.

Message 3 of 5
Anonymous
in reply to: Anonymous

I tried that.  It is still wblocking as 2013 format file.  I have to use the wblock method instead of the command version as the calling routine is within a reactor.

Message 4 of 5
phanaem
in reply to: Anonymous

Set default format via setenv or use Option Dialog box.

Then, after vla-Wblock, invoke vla-open, vla-save and vla-close methods.

This is just an example:

(defun MYWB ( name / ss my_dwg)
  (or *AcadObject* (setq *AcadObject* (vlax-get-acad-object)))
  (or *AcDoc*  (setq *AcDoc* (vla-get-ActiveDocument *AcadObject*)))
  (setenv "DefaultFormatForSave" "48") ; acad2010 format
  (if
    (ssget)
    (progn
      (vla-WBlock *AcDoc* name (setq ss (vla-get-ActiveSelectionSet *AcDoc*)))
      (vla-delete ss)
      (setq my_dwg (vla-Open (vla-get-Documents *AcadObject*) name :vlax-false))
      (vla-Save my_dwg)
      (vla-Close my_dwg :vlax-false)
      )
    )
  (princ)
  )

 

 

Message 5 of 5
Anonymous
in reply to: phanaem

Thanks for the help. It's not as streamlined as I would like, but it works. Patrick Starkey Assistant Systems Manager SFCS Inc. 305 South Jefferson Street Roanoke, VA 24011-2003 Voice: 540.344.6664 Fax: 540.343.6925 Email: pstarkey@sfcs.com Website: www.sfcs.com:www.sfcs.com> SFCS is a full-service architectural, engineering, planning, and interior design firm that specializes in the design of senior living, education, health care, and government facilities nationwide. ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________:www.sfcs.com>

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost