Community
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?
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.
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) )