Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dimension manipulation

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
256 Views, 3 Replies

Dimension manipulation

in our office we use different dimension scales within the same drawing. for
example we have a section @ factor of 12 and in that section we detail an
area @ a factor of 2. so in that section we have dimensions at a scale of
12 and 2. we control them by putting them on dims layer that coincides with
the scale factor of the string. On top of that we use the "dimpost" a lot
because we deal with field dimensions. So until we get a verified dimension
we will have a "VIF" attached to the dimesnion and when we get the dimension
we change the "VIF" to "FD" changing the text is not an issue but what I
need to be able to do is not have to worry about what my dimscale is if I
want to change the "VIF" to "FD" How would I extract out the dimscale of a
dimension so that I can update it without it changing to the current
dimscale..
3 REPLIES 3
Message 2 of 4
Kent1Cooper
in reply to: Anonymous

If it's done with DIMPOST, then it's kept in the entity's extended data. I couldn't figure out a way to substitute a value there, the way you can in an object's ordinary entity data list, but I did manage to find the name of the "property" for that, to do it another way. Try this:

{code}
(vl-load-com)
(setq diment (vlax-ename->vla-object (car (entsel "\nSelect Dimension to change suffix to FD: "))))
(vlax-put-property diment 'TextSuffix " FD")
{code}

--
Kent Cooper
Kent Cooper, AIA
Message 3 of 4
Anonymous
in reply to: Anonymous

Kent,
I am afraid I might not have explained myself very well. When it comes
to changing the suffix of the dimension from "VIF" to "FD" etc, I have that
figured out. The issue I am having is this for example. I have a dimension
of say 48" VIF and it is there at a scale of 12 and a scale of 2 (so two
different dimension strings at different plotted scales) Lets say that my
dimscale is set to 12. If I update the dimension at a scale of 12 from
"VIF" to "FD" i am golden, but if I also change the dimension string at a
scale of 2 then it changes that dimension string to a scale of 12. so I
need to be able to update any scale dimension without having to manually
change the dimscale first. Hope that makes better sense. or maybe you
understood and your response was a work around??
wrote in message news:6219867@discussion.autodesk.com...
If it's done with DIMPOST, then it's kept in the entity's extended data. I
couldn't figure out a way to substitute a value there, the way you can in an
object's ordinary entity data list, but I did manage to find the name of the
"property" for that, to do it another way. Try this:

{code}
(vl-load-com)
(setq diment (vlax-ename->vla-object (car (entsel "\nSelect Dimension to
change suffix to FD: "))))
(vlax-put-property diment 'TextSuffix " FD")
{code}

--
Kent Cooper
Message 4 of 4
Kent1Cooper
in reply to: Anonymous

It sounds to me like you're talking about setting DIMPOST to "FD" and then using DIM UPDATE to change the suffix in existing dimensions. If so, then yes, that will also change the dimension's overall scale to whatever is current, as well as everything else about it (style, dimension-line suppression, etc.), because that's what DIM UPDATE does.

But what I suggested *only replaces the suffix content* [or adds it, if the selected dimension doesn't have one], *without* updating anything else about the dimension, so it doesn't change its scale. [I tried it on dimensions whose overall scale was different from the current one, and it didn't affect that.] It doesn't even require you to change the current DIMPOST setting, or even to have one at all.

You *would* need to do it separately to *both* of those differently-scaled dimensions in each location, as written. But a slightly longer routine could be made that would let you just pick as many dimensions as you want, of both scales, and have it change the suffix on [or add it to] all of them at once, without altering anything else about them.

--
Kent Cooper


HT wrote...
....
If I update the dimension at a scale of 12 from "VIF" to "FD" i am golden, but if I also change the dimension string at a scale of 2 then it changes that dimension string to a scale of 12.....
Kent Cooper, AIA

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost