0 Members and 1 Guest are viewing this topic.
Hi,To get block references w/out using ssget, you can use gc:GetReferences.In the following example returns a list of all block references inserted in model space.The list type is: ((blockName1 (refEname refEname ...)) (blockName2 (refEname refEname ...)))Code: [Select]((lambda (/ name refs blst) (while (setq bl (tblnext "block" (not bl))) (setq name (cdr (assoc 2 bl))) (if (setq refs (gc:GetReferences name 2)) (setq blst (cons (list name refs) blst)) ) ) blst ))
((lambda (/ name refs blst) (while (setq bl (tblnext "block" (not bl))) (setq name (cdr (assoc 2 bl))) (if (setq refs (gc:GetReferences name 2)) (setq blst (cons (list name refs) blst)) ) ) blst ))
(ai_table "BLOCK" 4)
well,...by searching one of my post...I see this post..I know it is an old one..but no one consider the AI_TABLE as an option.so, just to add this idea.Code: [Select](ai_table "BLOCK" 4)