
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello all, I was trying to extract an attribute value from a block, I used this function by Lee Mac, but for some reasons it is not working properly for me.
Here is the function
(defun LM:getattributevalue ( blk tag / enx )
(if (= "ATTRIB" (cdr (assoc 0 (setq enx (entget (setq blk (entnext blk)))))))
(if (= (strcase tag) (strcase (cdr (assoc 2 enx))))
(cdr (assoc 1 enx))
)
)
)
and Here is part of my code, I have a block with an attribute tag "DIMENSION"
....
(setq obj (car (entsel)) )
(setq str (LM:GetAttributeValue obj "DIMENSION" ))
;; I have three attributes in the block, it works with the first attribute tag, but it is not working with the rest of them
I appreciate any help, thanks in advance
Solomon Tessema
Solved! Go to Solution.