Message 1 of 3
Not applicable
05-30-2017
12:46 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Anyone can help to enhance this lisp to list the attribute value of xref block (dynamic block) for a grid line.
Below is the link to attached lisp, which can be a starting point. Need to improve this lisp to select xref block and it's a dynamic block.
http://forums.augi.com/showthread.php?150072-Get-Attribute-Value-from-Block-Tag
Attached is a sample grid lines. Xref-attached this grid to a new drawing. It is in this new drawing I want to list any grid to get the Grid-Ref value.
This is to avoid zoom in/out and pan to find out the xref grid number when working in the center of he drawing.
(vl-load-com)
(defun c:GAV (/ LM:GetAttributeValue ss attValue)
(defun LM:GetAttributeValue (blk tag / val enx)
(while
(and
(null val)
(= "ATTRIB"
(cdr (assoc 0 (setq enx (entget (setq blk (entnext blk))))))
)
)
(if (= (strcase tag) (strcase (cdr (assoc 2 enx))))
(setq val (cdr (assoc 1 enx)))
)
)
)
(if (and (setq ss (ssget ":S:E" '((0 . "INSERT") (2 . "GRID") (66 . 1))))
(setq attValue (LM:GetAttributeValue (ssname ss 0) "GRID-REF"))
)
(prompt (strcat "\n[Attribute Value] : " attValue))
)
(princ)
)
Thanks
Solved! Go to Solution.