Hi All,
I was wondering if anyone has seen this before; I am trying to put a selected object behind all objects in the drawing by doing the following;
Code:
(setq doc (vla-get-activedocument (vlax-get-acad-object)))
(setq space (vla-get-activelayout doc))
(setq extdict (vla-getextensiondictionary (vla-get-block space)))
(if (vl-catch-all-error-p
(setq sorttbl (vl-catch-all-apply 'vla-Item (list extdict "ACAD_SORTENTS"))))
(setq sorttbl (vla-AddObject extdict "ACAD_SORTENTS" "AcDbSortentsTable")));if
(setq ent (vlax-ename->vla-object (ssname selectedObj 0)))
(vlax-invoke sorttbl 'movetobottom (list ent))
.........
It works as long as I launch AutoCAD first and then open the drawing! If I double click on the drawing in Explorer (or any other programs that use the dwg file association...) the program will give me the following error : "; error: Automation Error. Description was not provided."
I am totally lost!! Any help will be very much appreciated!!!
Thanks!
-Rick-