Fit Block Attribute Definition within the frame

Fit Block Attribute Definition within the frame

nathan307
Enthusiast Enthusiast
626 Views
2 Replies
Message 1 of 3

Fit Block Attribute Definition within the frame

nathan307
Enthusiast
Enthusiast

Dear Friends,

     I want to fit Block Attribues(Attribute Definition) within the frame...

     If the number of Characters increases cause the size of text(Attribue Definition) larger than the size of frame,It will  place the attribute(some text) out side the frame. It must placed inside the frame while increasing the characters while editing...

     The text size can be decreased depending on number of characters in the frame to avoid place outside the frame...

      Is it possible?

      If it is popssible then give your Suggestions...

 

   Thankyou Friends,

    nathan307

0 Likes
627 Views
2 Replies
Replies (2)
Message 2 of 3

norman.yuan
Mentor
Mentor

Are you sure what you want to make change is Attribute DEFINITION, not attribute REFERENCE?

 

Usually Attribute definition only exists inside a block defenition and will not be seen in drawing, so what is the point concerning its width exceeding the frame? It does not make much sense, to me. But if you insist to change the attribute definition, then, yes, you can change its text size, and even WidthFactor, because it is just AutoCAD text (i.e. AttributeDefinition is a class derived from DBText). If you make change to an AttributeDefinition in a block definition, it will not have effect on any existing block reference to that block definition and only newly created block refernce may (but not necessarily) show the corrsponding AttributeReference with changed text size/WidthFactor.

 

On the other hand, if you really want to be changed is AttributeReference, as I suspected, you can do the same thing, because AttributeReference is also a class derived from DBText, as long as you can identify which AttributeReference in which Blockreference to change.

Norman Yuan

Drive CAD With Code

EESignature

0 Likes
Message 3 of 3

SENL1362
Advisor
Advisor

instead of decreasing the text Height which make the text difficult to read you could also make the text "shorter" by adjusting the WidthFactor <1

 

for horizontal text some pseudo code:

textWidth=text.GeometricExtents.MaxPoint.X-text.GeometricExtents.MinPoint.X

text.WidthFactor=1

if (textWidth>maxFrameWidth)

text.WidthFactor=maxFrameWidth/textWidth

 

 

0 Likes