.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Possible to reuse Point2d's? (c#)

1 REPLY 1
Reply
Message 1 of 2
Matt S
439 Views, 1 Reply

Possible to reuse Point2d's? (c#)

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. 🙂

Any help is appreciated

Thanks
1 REPLY 1
Message 2 of 2
Anonymous
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. 🙂

Any help is appreciated

Thanks

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost