rayg11757 Posted September 12, 2011 Share Posted September 12, 2011 I'm looking to obtain dynamic block "Descriptions" rather than the block's "Effective Name" or "Name." The original-block's "Description" is available in the "Properties" dialog box while inside the block editor. Below is a code snippet courtesy of Lee Mac's website that yields the "Effective Name," and is somewhat similar to what I'm trying to do. I assume that the new code will require the command, but I cannot figure out how to get past the anonymous block names, and to pass the value between functions. (defun _GetBlockName ( obj ) (vlax-get-property obj (if (vlax-property-available-p obj 'EffectiveName) 'EffectiveName 'Name))) Thank you for any help. Ray Quote Link to comment Share on other sites More sharing options...
pBe Posted September 12, 2011 Share Posted September 12, 2011 (edited) wont vla-get-Description work? EDIT: Shoot. you are right. vla-get-comments (defun c:test () (setq blks (vla-get-Blocks (vla-get-ActiveDocument (vlax-get-acad-object)))) (setq ent (vlax-ename->vla-object (Car (entsel)))) (print (vla-get-comments (vla-item Blks (vla-get-effectivename ent)))) (princ) ) silly me... Edited September 12, 2011 by pBe Quote Link to comment Share on other sites More sharing options...
rayg11757 Posted September 12, 2011 Author Share Posted September 12, 2011 Awesome. Thank you very much. Spent about 8 hours yesterday, and I think pat of my problem was by not using the entity selection properly (Car (entsel)) and part was with not understadning the "activedocument" "acadobject" "ename" lines of code properly. Someday, after all my efforts, I intend to understand AutoLISP/VLISP beyond trial-and-error. Thank you, again. Ray Quote Link to comment Share on other sites More sharing options...
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.