kalai Posted October 22, 2011 Posted October 22, 2011 Hi, My code (setq ss1 (ssget "X" '((0 . "INSERT"))) ) Using this i could collect all block object. I need to collect blocks with attributes only. Quote
Tharwat Posted October 22, 2011 Posted October 22, 2011 Like this .. (setq ss1 (ssget "_x" '((0 . "INSERT")(66 . 1)))) Quote
kalai Posted October 22, 2011 Author Posted October 22, 2011 thanks it works. Now i could get the block . How am i to retrieve the attribute value Quote
kalai Posted October 22, 2011 Author Posted October 22, 2011 Now i could get the block . How am i to retrieve the attribute valu Quote
kalai Posted October 22, 2011 Author Posted October 22, 2011 Is it possible to get attribute of external ref block Quote
Tharwat Posted October 22, 2011 Posted October 22, 2011 This would print values to command line ... (defun c:TesT (/ blk vla) ;;; Tharwat 22. Oct. 2011 ;;; (vl-load-com) (if (setq blk (ssget "_+.:s" '((0 . "INSERT") (66 . 1)))) (progn (setq vla (vlax-ename->vla-object (ssname blk 0))) (foreach x (vlax-invoke vla "GetAttributes") (print (vla-get-textstring x)) ) ) (princ) ) (princ) ) Tharwat Quote
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.