Doctor_Che Posted January 17, 2018 Share Posted January 17, 2018 Hi! I try to use this code: ;; 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) ) (print (AnonymousInstancesof "blockname")) But if file has a table I have an error: "error: ActiveX Server returned the error: unknown name: EffectiveName". If I delete a table everything is good. What is wrong with this code? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted January 17, 2018 Share Posted January 17, 2018 You may use this code from my site instead. Quote Link to comment Share on other sites More sharing options...
CAD_Noob Posted January 18, 2018 Share Posted January 18, 2018 can this be applied to the Revision number / letter? Quote Link to comment Share on other sites More sharing options...
Doctor_Che Posted January 18, 2018 Share Posted January 18, 2018 You may use this code from my site instead. Thanks Lee! It is exactly what I need! To get all anonymous references with mask. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted January 18, 2018 Share Posted January 18, 2018 Thanks Lee!It is exactly what I need! To get all anonymous references with mask. You're welcome! 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.