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?
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.
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
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]
Access a broad range of knowledge to help get the most out of your products and services.
Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.
Upgrading to a 2015 product? Make sure to check these out 1st!