Hi all,
I usually post over at CadTutor but the site is down for repair. I try not to jump back and forth between forums because I am not sure how you guru's look upon this.
This being said, I could really use some assistance.
All I want to do is check my acad file to see if a PlotTab is there and if it is, delete it and move on. I have come close but the more I try to figure it out the more screwed up I become and the more confused I become. This should be simple but I am mind-boggeled.
(defun C:test ( / deleteLayout)
(vl-load-com)
(setq
acadObject (vlax-get-acad-object)
acadActiveDocument (vla-get-ActiveDocument acadObject)
acadLayouts (vla-get-Layouts acadActiveDocument)
)
;-----------------------------------------------------------------------------------------
(vla-StartUndoMark acadActiveDocument) ;Start of UNDO
;-----------------------------------------------------------------------------------------
(vlax-for eachLayout acadLayouts
(if
(eq (vla-get-name eachLayout) Plot)
(progn
(setq Layout eachLayout)
(vla-delete Layout)
)
)
)
;-----------------------------------------------------------------------------------------
(vla-EndUndoMark acadActiveDocument) ;End of UNDO
;-----------------------------------------------------------------------------------------
(princ)
)
Thanks