Lt Dan's legs Posted August 4, 2010 Posted August 4, 2010 This is a code Alan did a while back. Because I work with a number of dynamic blocks, I use this routine a lot. I was able to to change the tag but when it did the visibility didn't change. how would I be able to change the tag and visibility? (defun c:tbd (/ blockname [color=black]p1);;revised by Reid B.[/color] [color=black] ;; Insert and array "LONG WALL" block (required)[/color] ;; Alan J. Thompson, 05.05.10 (vl-load-com) (setq blockname "[color=black]1117sh");;revised by Reid B.[/color] (if (and (or (tblsearch "block" blockname) (findfile (strcat blockname ".dwg")) (alert (strcat blockname " cannot be found!")) ) (setq p1 (getpoint "\nSpecify block insertion point: ")) ) ((lambda (block) (foreach x (vlax-invoke block 'GetDynamicBlockProperties) (and (eq (vla-get-propertyname x[color=black]) "Sheet Size");;revised by Reid B.[/color] (vla-put-value x "[color=black]24x36[/color]" );[color=black]revised by Reid B.[/color] ) ) ) (vla-insertblock (if (or (eq acmodelspace (vla-get-activespace (cond (*AcadDoc*) ((setq *AcadDoc* (vla-get-activedocument (vlax-get-acad-object)))) ) ) ) (eq :vlax-true (vla-get-mspace *AcadDoc*)) ) (vla-get-modelspace *AcadDoc*) (vla-get-paperspace *AcadDoc*) ) (vlax-3d-point (trans p1 1 0)) blockname 1. 1. 1. 0.;;[color=black]revised by Reid B.[/color] ) ) ) (princ) ) The tag I'm trying to change is DR2 and the value APC. It was never an issue before because I used fields but I was asked to remove the field ____ hope you don't mind me posting this code Alan. If you do, I'll remove it 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.