& Construction

Integrated BIM tools, including Revit, AutoCAD, and Civil 3D
& Manufacturing

Professional CAD/CAM tools built on Inventor and AutoCAD
Integrated BIM tools, including Revit, AutoCAD, and Civil 3D
Professional CAD/CAM tools built on Inventor and AutoCAD
Hi all,
I have a little portion of code that i want to modify to instead of listing all attribute values from selected block,
to only list two:
COLOR_DESIG and MAT_DESIG
See attached sample code...
Thanks!
Solved! Go to Solution.
Hi,
The simplest way is using getpropertyvalue.
(defun c:test3 (/ bnm blks i ent) (setq bnm (cdr (assoc 2 (entget (car (entsel "\nSelect Block: "))))) blks (ssget "_X" (list (cons 2 bnm) '(66 . 1))) ) (repeat (setq i (sslength blks)) (setq ent (ssname blks (setq i (1- i)))) (print (strcat "\nCOLOR_DESIG: " (getpropertyvalue ent "COLOR_DESIG"))) (print (strcat "\nMAT_DESIG: " (getpropertyvalue ent "MAT_DESIG"))) ) (princ) )
That was exactly what I needed.
Thank you very much.
Hello,
Maybe you can assist me further?
I'm trying to use the information from the attributes to create hyperlinks. It works, but updates all the detail tag blocks in the drawing, not just the one selected???
I have attached the sample code and a sample drawing.
How to buy
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © 2025 Autodesk Inc. All rights reserved
Type a product name