PDA

View Full Version : LDT Un-associating a project from a drawing.



kdayman
2005-01-19, 09:53 PM
I am looking to disconnect or un-associate an LDT project from a drawing. Anyone want to throw me a bone as to where to start?

Jeff_M
2005-01-20, 12:49 AM
Well, it's not VBA but it gets the job done.


(defun c:un-project (/ dicts ss ent)
(vl-load-com)
(setq dicts (vla-get-dictionaries
(vla-get-activedocument
(vlax-get-acad-object))))
(vlax-for dict dicts
(if (vlax-property-available-p dict 'name)
(progn
(if (vl-string-search "AEC_VARS" (vla-get-name dict))
(vla-delete dict)
)
)
)
)
(if (setq ss (ssget "x" '((2 . "ADCADD_ZZ"))))
(while (setq ent (ssname ss 0))
(entdel ent)
(ssdel ent ss)
)
)
(princ "\nDrawing disaccociated from project...")
(princ)
)

kdayman
2005-01-20, 03:21 PM
miff,

That's great does exactly what I want. Thank you very much!

I am still interested in seeing how one would do it in VBA, but the above code will keep the company happy.

Kelly