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

PointPromptResult and Point2D Compatibility

3 REPLIES 3
Reply
Message 1 of 4
tcorey
307 Views, 3 Replies

PointPromptResult and Point2D Compatibility

 

Dim ptll AsPromptPointResult 

Dim ptlr AsPoint2d       

 

ptll = acDoc.Editor.GetPoint(PrmtPointOpt)                                

ptlr = PolarPoints(ptll, 0, desFrameWid)

 

The code above creates a point called ptll using the GetPoint function. The code that creates ptlr wants a Point2d as its basepoint arguement, but ptll is a PromptPointResult and causes an error when I plug it in as basepoint.

 

Does anyone know how to convert a PromptPointResult into a Point2D?

 

TIA,

 

Tim

 

 

                            



Tim Corey
MicroCAD Training and Consulting, Inc.
Redding, CA
Autodesk Gold Reseller

New knowledge is the most valuable commodity on earth. -- Kurt Vonnegut
3 REPLIES 3
Message 2 of 4
tcorey
in reply to: tcorey

Never mind, I figured it out. I guess I should think just a little before posting.

 

To solve it, I created X,Y variables from the promptpointresult object and substituted those into the x,y values of a point2d object, and then used that as the basepoint.

 

 



Tim Corey
MicroCAD Training and Consulting, Inc.
Redding, CA
Autodesk Gold Reseller

New knowledge is the most valuable commodity on earth. -- Kurt Vonnegut
Message 3 of 4
Alfred.NESWADBA
in reply to: tcorey

Hi,

 

look to this (and don't forget to declare varaibles so you get the message of some issues at the moment you write your code!

 

'assuming you have the following statement on top of your codefile
Imports Autodesk.AutoCAD

Dim ptll as EditorInput.PromptPointResult ptll = acDoc.Editor.GetPoint(PrmtPointOpt) if ptll.Status = EditorInput.PromptStatus.OK then 'so we know the query for the point was not ESCaped dim pt as Geometry.Point3D = ptll.Value 'now you can goon

 

 

- alfred -

 

[EDIT] ok, to late [/EDIT]

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 4 of 4
tcorey
in reply to: tcorey

Thanks, Alfred.



Tim Corey
MicroCAD Training and Consulting, Inc.
Redding, CA
Autodesk Gold Reseller

New knowledge is the most valuable commodity on earth. -- Kurt Vonnegut

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