Message 1 of 8
How to force running commands in the created drawing ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
How to force running commands in the created drawing ?
I created a new drawing using ( vla-add )
The code creates a point in the created drawing but ( zoom extents ) in the original drawing not the created drawing .. anyone can help in this ?
(defun C:DRZ (/ acadApp acadDoc)
(vl-load-com)
(setq acadApp (vlax-get-acad-object))
(setq acadDoc (vla-Add (vla-get-Documents acadApp)))
(vla-AddPoint (vla-get-ModelSpace acadDoc) (vlax-3d-point 10000 10000 0))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(vla-put-ActiveDocument acadApp acadDoc)
(vla-ZoomExtents acadApp)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(vla-Activate acadDoc)
(vla-SendCommand (vla-get-activedocument (vlax-get-acad-object)) (strcat "Zoom" " " "e" " "))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(princ)
)
(princ)