Please help...
How do I tell vla-addLightweightPolyline which paper space layout to draw the polyline in. I want to add the pl in the current layout regardless of whether its "Model" or one of multiple p/s layouts.
The code below only puts the polyline in the first paper space layout regardless of which p/s layout is actually current.
What am I missing?
Do I need to add the polyline and then change its layout property using vla-put- or is there an easier way to tell vla-addL.... which layout is current?
The second p/s code fragment below doesn't work at all!!
(the model space works fine in all cases)
Code:
(if (= (getvar "CTAB") "Model")
(setq OBJ (vla-addLightweightPolyline (model-space) SA1))
(setq OBJ (vla-addLightweightPolyline (paper-space) SA1))
)
(defun acad-object ()
(cond (*acad-object*) ; Return the cached object
(t
(setq *acad-object* (vlax-get-acad-object))
)
)
)
(defun active-document ()
(cond (*active-document*) ; Return the cached object
(t
(setq *active-document* (vla-get-activedocument (acad-object)))
)
)
)
(defun model-space ()
(cond (*model-space*) ; Return the cached object
(t
(setq *model-space* (vla-get-modelspace (active-document)))
)
)
)
(defun paper-space ()
(cond (*paper-space*) ; Return the cached object
(t
(setq *paper-space* (vla-get-paperspace (active-document)))
)
)
)
Code:
(if (= (getvar "CTAB") "Model")
(setq OBJ (vla-addLightweightPolyline (model-space) SA1))
(setq OBJ (vla-addLightweightPolyline (vla-get-ActiveLayout (active-document)) SA1))
)
Thanks