- ;;;_$ (documents)
- ;;;(#<VLA-OBJECT IAcadDocument 0000020466025508> #<VLA-OBJECT IAcadDocument 000002046a090ac8>)
- (defun documents (/ r)
- (vlax-for d (vla-get-documents
- (vla-get-application (vlax-get-acad-object))
- )
- (setq r (cons d r))
- )
- (reverse r)
- )
- ;;;_$ (document-getbyname "Drawing1.dwg")
- ;;;#<VLA-OBJECT IAcadDocument 0000020466025508>
- (defun document-getbyname (name / docs r)
- (setq docs (documents))
- (while docs
- (if (= name (vla-get-name (car docs)))
- (setq r (car docs)
- docs nil
- )
- )
- (setq docs (cdr docs))
- )
- r
- )
- (vla-activate (document-getbyname "Drawing1.dwg"))
|