I should know this, but it escapes me. I want to override the measurement in a dimension with a string of text using a LISP command.
E.g.. "select dimension"
type new text for dimension
replace dimension measurement with new text.
I can get the entity and its values, buy not sure which value to change for the "text override".
BTW Acad 2012.
Any help would be appreciated.
Dave
Solved! Go to Solution.
Solved by Kent1Cooper. Go to Solution.
@Anonymous wrote:.... I want to override the measurement in a dimension with a string of text using a LISP command.
....
I can get the entity and its values, buy not sure which value to change for the "text override".
....
There are at least a couple of ways to do that:
(entmod
(subst
(cons 1 YourNewTextContentVariable)
(assoc 1 YourEntityData)
YourEntityData
)
)
or convert it to a VLA object, and do:
(vla-put-TextOverride YourVLAObject YourNewTextContentVariable)
And there may be others....
@Anonymous wrote:I can get the entity and its values, buy not sure which value to change for the "text override".
....
Perfect. Thank you very much. ....
You're welcome. The easy way to identify which value to change for anything is to draw something, give the characteristic of it that you want to identify a distinctive value, and look at the entity data to find that value. So if you draw a dimension, and override its text content in the Properties Box or by way of a text-editing command -- let's say you change it to say "Text override" -- and then apply (entget) to it, you'll find this entry in the entity data:
(1 . "Text override")
That will tell you that it's the DXF code 1, or (assoc 1) value, or however you want to describe it, that holds that information.
I suggest a distinctive value particularly for the case of numerical entries. For instance, if you want to know what DXF entry holds the Thickness of an entity, draw one and change its Thickness in the Properties Box or by way of CHPROP. But don't change it to something like 1 or 1.0, because there may be a variety of DXF entries that have that in them, just as there may be several that have 0.0 in them, so you may not be able to tell which one it is if you leave its Thickness at 0. Change it to something out-of-the-ordinary lke 1.2345, and it will be easy to locate it in the entity data list [Thickness is 39].
Can't find what you're looking for? Ask the community or share your knowledge.