Using GeometricExtents with UCS problems

Using GeometricExtents with UCS problems

Anonymous
Not applicable
1,147 Views
3 Replies
Message 1 of 4

Using GeometricExtents with UCS problems

Anonymous
Not applicable

I've looked around at some other posts but can't find the answer to my problem.

 

I am trying to get the distance from the insertion point of a block and the maxX, maxY of an attribute of the block. My routine works fine when there is no UCS, however, the MaxPoints I get back when there is a UCS present is different. This is the line of code I'm using.

 

                                       AttEndPt = NewPoint2d(attref.GeometricExtents.MaxPoint.X, attref.GeometricExtents.MaxPoint.Y)

 

The point returned is different if there is no UCS and when there is a UCS.

 

Any suggestions would be greatly appreciated.

 

thanks

cj

0 Likes
Accepted solutions (1)
1,148 Views
3 Replies
Replies (3)
Message 2 of 4

Hallex
Advisor
Advisor

Perhaps like this

AttEndPt = New Point3d(attref.GeometricExtents.MaxPoint.TransformBy(blkRef,BlockTransform).X, _

attref.GeometricExtents.MaxPointTransformBy(blkRef,BlockTransform).Y)

 

_____________________________________
C6309D9E0751D165D0934D0621DFF27919
0 Likes
Message 3 of 4

Anonymous
Not applicable
Accepted solution

Thanks Hallex,

 

It turns out it was more of a problem in my logic..got it working the way I needed to.

 

cj

0 Likes
Message 4 of 4

Anonymous
Not applicable

The saga continues..... Although I have altered my logic, still have an issue.

 

What I really need to do is find the coordinate that represents the end of an Attribute value when there is a UCS present.

 

Have tried using the GeometricExtents, with and without the transformby and can't seem to get where I need to be.

 

Not sure of what logic to use, try and get the length of the text of the Attribute value, then apply that to the insertion point, but I can't seem to do this with UCS coordinates.

 

Can anyone provide some insight or any suggestions on the easiet way to do this?

 

thanks

 

cj

 

 

0 Likes