Changing Text Height/Width of Individual Block Attribute

Changing Text Height/Width of Individual Block Attribute

Anonymous
Not applicable
2,514 Views
1 Reply
Message 1 of 2

Changing Text Height/Width of Individual Block Attribute

Anonymous
Not applicable

Posted elsewhere but was told I may have more luck here. It's been so long that I can't recall if the command I'm looking for was base/vanilla ACAD or whether it was a 3rd party LISP/ARX that I installed but it's worth a shot.

 

Just to state up front, I am *not* looking for ATTSYNC, BATTMAN, BEDIT, or EATTEDIT - my searches have turned up those 4 commands nearly every time, and I am quite certain they are not the answer here. Awhile back I found a very specific command to change the text height and width of individual block attributes and after some time away from ACAD it escapes me. The functionality is as follows:

 

After typing the command into the command line, a dialog box appears. There is an option to enter the text height/width manually, or to copy the properties of existing text within the drawing - this functioned very much like the eyedropper tool in MSPaint, as it allows you to copy the properties of the reference text by clicking on it. After either manually entering the text properties or copying it from reference text within the drawing, then confirming my selection, the mouse icon was replaced by a small box and I could then apply the text properties to any text in the drawing simply by clicking it, very similar to the functionality of "Format Painter" in MSWord. 

 

It may not be that the command was even specific to attributes or blocks, simply that it allowed the text of those to be changed freely and easily. Any help determining this command is very much appreciated. 

0 Likes
2,515 Views
1 Reply
Reply (1)
Message 2 of 2

jdiala
Advocate
Advocate

No error function

 

(defun C:test ( / e h w en)
  (setq e (vlax-ename->vla-object (car (nentsel "\n Select an attribute to change:"))))
  (progn
    (initget 1 "Yes No")
    (setq ans (getkword "\nDo you want to enter height and width manually or matchprop? (Yes or No)"))
    (if (= ans "Yes")
      (progn
        (setq h (getdist "\nEnter height of text:")
              w (getdist "\nEnter width factor of text:")
        )
        (if 
          (and h w )
          (progn 
            (vla-put-height e h)
            (vla-put-scalefactor e w)
          )
        )
      )
      (progn
        (setq en 
          (vlax-ename->vla-object 
            (car 
              (nentsel "\nSelect a text to match properties:")
            )
          )
        )
        (vla-put-height e (vla-get-height en))
        (vla-put-scalefactor e (vla-get-scalefactor en))
      )
    )
  )
  (princ)
)