DuanJinHui Posted April 30, 2015 Share Posted April 30, 2015 error: ActiveX Server returned the error: unknown name: Explode , Why ? autocad 2010 , windows xp ;|==================================================-=========================== * Универсальная функция разбития proxy-объектов. * Параметры вызова: * нет * Примеры вызова: (_kpblc-block-explode-proxy) ==================================================-===========================|; (defun _kpblc-block-explode-proxy (/ selset item layer_list) (vl-load-com) (setq selset (ssget "_X" '((0 . "ACAD_PROXY_ENTITY")))) (vlax-for item (vla-get-layers (vla-get-activedocument (vlax-get-acad-object))) (if (= (vla-get-lock item) :vlax-true) (progn (setq layer_list (append layer_list '(item))) (vla-put-lock item :vlax-false) ) ;_ end of progn ) ;_ end of if ) ;_ end of vlax-for (while (and selset (> (sslength selset) 0) ) ;_ end of and (setq item (ssname selset 0)) (ssdel item selset) (vla-explode (vlax-ename->vla-object item)) ) ;_ end of while (foreach item layer_list (vla-put-lock item :vlax-true) ) ;_ end of foreach ) ;_ end of defun ;|==================================================-=========================== * Сервисная функция для вызова из ком.строки ==================================================-===========================|; (defun c:xproxy (/ adoc) (vla-startundomark (vla-get-activedocument (vlax-get-acad-object))) (_kpblc-block-explode-proxy) (vla-endundomark (vla-get-activedocument (vlax-get-acad-object))) ) ;_ end of defun Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted April 30, 2015 Share Posted April 30, 2015 Change: (vla-explode (vlax-ename->vla-object item)) to: (if (vlax-method-applicable-p (setq obj (vlax-ename->vla-object item)) 'explode) (vla-explode obj)) Quote Link to comment Share on other sites More sharing options...
DuanJinHui Posted May 4, 2015 Author Share Posted May 4, 2015 Change: (vla-explode (vlax-ename->vla-object item)) to: (if (vlax-method-applicable-p (setq obj (vlax-ename->vla-object item)) 'explode) (vla-explode obj)) Thanks Lee, Now, No err. why I use this routine can't explode "ACAD_PROXY_ENTITY" object ? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted May 4, 2015 Share Posted May 4, 2015 Thanks Lee, Now, No err. why I use this routine can't explode "ACAD_PROXY_ENTITY" object ? As far as I'm aware the ActiveX explode method does not apply to an ACAD_PROXY_ENTITY entity type; you may need to call the standard EXPLODE command to process this object. Quote Link to comment Share on other sites More sharing options...
DuanJinHui Posted May 21, 2015 Author Share Posted May 21, 2015 As far as I'm aware the ActiveX explode method does not apply to an ACAD_PROXY_ENTITY entity type; you may need to call the standard EXPLODE command to process this object. Many thanks ,Lee. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted May 22, 2015 Share Posted May 22, 2015 You're welcome Quote Link to comment Share on other sites More sharing options...
Doctor_Che Posted January 17, 2018 Share Posted January 17, 2018 Hi! I have a similar error. "error: ActiveX Server returned the error: unknown name: EffectiveName" And I have this error if file has a table. If I delete a table everithing is good. autocad 2015 , windows 8 ;; Returns list of the Anonymous names taken by a Dynamic Block (if any) - Lee Mac 2011 - www.lee-mac.com ;; Arguments: block - name of Dynamic Block. (defun AnonymousInstancesof ( block / def rec nme ref lst ) (while (setq def (tblnext "BLOCK" (null def))) (if (= 1 (logand 1 (cdr (assoc 70 def)))) (progn (setq rec (entget (cdr (assoc 330 (entget (tblobjname "BLOCK" (setq nme (cdr (assoc 2 def)))) ) ) ) ) ) (while (setq ref (assoc 331 rec)) (if (and (eq block (vla-get-effectivename (vlax-ename->vla-object (cdr ref)))) (not (member nme lst)) ) (setq lst (cons nme lst)) ) (setq rec (cdr (member (assoc 331 rec) rec))) ) ) ) ) (reverse lst) ) Quote Link to comment Share on other sites More sharing options...
rlx Posted January 17, 2018 Share Posted January 17, 2018 Welcome on CadTutor Doctor_Che Usually this error occurs when a block is not dynamic. Use this : (setq object (vlax-ename->vla-object (cdr ref))) (if (vlax-property-available-p object 'effectivename) (setq block (vla-get-effectivename object)) (setq block (vla-get-name object)) ) gr. Rlx Quote Link to comment Share on other sites More sharing options...
Doctor_Che Posted January 17, 2018 Share Posted January 17, 2018 Usually this error occurs when a block is not dynamic. But if I understand good the problem is not with block... I have tried this code with new clean file. (print (AnonymousInstancesof "blockname")) The result is "nil". After I have inserted a table (just new empty table) into the file the result is "error: ActiveX Server returned the error: unknown name: EffectiveName". So it is no block or dynamic block in file. Just a table (ACAD_TABLE). Quote Link to comment Share on other sites More sharing options...
rlx Posted January 17, 2018 Share Posted January 17, 2018 I'm not much of an expert on tables but assuming it is this (and not any other) function that's responsible for the error you can try : (and (vlax-property-available-p (vlax-ename->vla-object (cdr ref)) 'effectivename) (eq block (vla-get-effectivename (vlax-ename->vla-object (cdr ref)))) (not (member nme lst)) ) but I have no clue on this moment why this function would filter out a table in the first place. gr. Rlx Quote Link to comment Share on other sites More sharing options...
Doctor_Che Posted January 17, 2018 Share Posted January 17, 2018 I'm not much of an expert on tables but assuming it is this (and not any other) function that's responsible for the error you can try : (and (vlax-property-available-p (vlax-ename->vla-object (cdr ref)) 'effectivename) (eq block (vla-get-effectivename (vlax-ename->vla-object (cdr ref)))) (not (member nme lst)) ) but I have no clue on this moment why this function would filter out a table in the first place. gr. Rlx Thank you gr. Rlx! Now it works! On another forum people say that table is a block with name like *T. Quote Link to comment Share on other sites More sharing options...
rlx Posted January 17, 2018 Share Posted January 17, 2018 Glad it works now! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.