Writes out the given
selection set as a new drawing file.
Signature
VBA : object.WBlock
FileName, SelectionSet
VL : (vla-WBlock object
FileName SelectionSet)
(vla-WBlock thisdrawing "c:/test.dwg"
newSet)
-
Object :
Document
The object or objects this method applies to.
-
FileName
: String;
input-only
The file name to write the selection set to.
-
SelectionSet :
SelectionSet object;
input-only
The name of the selection set.
Example :
(defun c:al-wblock ()
(vl-load-com)
(setq thisdrawing (vla-get-activedocument
(vlax-get-acad-object)))
(setq ssets (vla-get-selectionsets thisdrawing))
(if (vl-catch-all-error-p
(vl-catch-all-apply 'vla-item (list ssets "$Set")))
(setq newSet (vla-add ssets "$Set"))
(progn
(vla-delete (vla-item ssets "$Set"))
(setq newSet (vla-add ssets "$Set"))
);progn
);if
;select all objects in the drawing
(vla-Select newSet acSelectionSetAll)
(vla-WBlock thisdrawing "c:/test.dwg" newSet)
(princ)
);defun
|
|