Jump to content

Recommended Posts

Posted

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

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...