.NET

Reply
Valued Contributor
cjacobi
Posts: 54
Registered: ‎11-12-2012
Message 1 of 4 (167 Views)
Accepted Solution

Using GeometricExtents with UCS problems

167 Views, 3 Replies
03-31-2014 01:00 PM

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

*Expert Elite*
Hallex
Posts: 1,569
Registered: ‎10-08-2008
Message 2 of 4 (161 Views)

Re: Using GeometricExtents with UCS problems

03-31-2014 01:19 PM in reply to: cjacobi

Perhaps like this

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

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

 

_____________________________________
C6309D9E0751D165D0934D0621DFF27919
Valued Contributor
cjacobi
Posts: 54
Registered: ‎11-12-2012
Message 3 of 4 (128 Views)

Re: Using GeometricExtents with UCS problems

04-01-2014 05:26 AM in reply to: Hallex

Thanks Hallex,

 

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

 

cj

Valued Contributor
cjacobi
Posts: 54
Registered: ‎11-12-2012
Message 4 of 4 (103 Views)

Re: Using GeometricExtents with UCS problems

04-02-2014 08:38 AM in reply to: cjacobi

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

 

 

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community