.NET

Reply
Valued Contributor
Matt S
Posts: 64
Registered: ‎05-05-2004
Message 1 of 2 (295 Views)

Possible to reuse Point2d's? (c#)

295 Views, 1 Replies
12-09-2005 07:58 PM
I know Point2d is a managed class, so it would seem that one would be able to set the X and Y values. Maybe I am missing something, but I can't find any way to do ths. The X and Y properties are read only. I haven't tried to use Transformby() to modify the point to a new location becuase it seems easier to just make new points. In ARX one could set values into the AcGePoint2d objects, why can't we do that in .NET? If we can, why haven't I been able to find a way? No need to answer the second question. :smileyhappy:

Any help is appreciated

Thanks
*Tomi
Message 2 of 2 (295 Views)

Re: Possible to reuse Point2d's? (c#)

12-11-2005 04:02 PM in reply to: Matt S
In VB.NET it would be something like:

Dim x as Double = 10
Dim y as Double = 20
Dim MyPoint as Point2d = New Point2d(x , y)

Or

Dim x as Double = 10
Dim y as Double = 20
Dim MyPoint as Point2d
... code in here ...
MyPoint = New Point2d(x , y)



After you have set MyPoint object, you can read the x and y values with:
x = MyPoint.X
y = MyPoint.Y


Hope you get the idea.

/ Tomi

kirjoitti viestissä:5034821@discussion.autodesk.com...
I know Point2d is a managed class, so it would seem that one would be able
to set the X and Y values. Maybe I am missing something, but I can't find
any way to do ths. The X and Y properties are read only. I haven't tried
to use Transformby() to modify the point to a new location becuase it seems
easier to just make new points. In ARX one could set values into the
AcGePoint2d objects, why can't we do that in .NET? If we can, why haven't I
been able to find a way? No need to answer the second question. :smileyhappy:

Any help is appreciated

Thanks

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