GetPoint with Enter states "Invalid Point" instead of returning – Change in behavior

By Wayne Brill

Issue

I am using the GetPoint method. (AutoCAD COM interface using late binding). In AutoCAD 2010 and in previous versions hitting enter when prompted for a point would return. In 2011 instead of returning, "Invalid Point" is printed on the command line. Is there a way to allow Enter to return using GetPoint () in AutoCAD 2011 and later versions?

Solution

This change in behavior is considered to be correct. If you need Enter to be accepted with GetPoint make a call to InitializeUserInput(0) of the Utility object before using GetPoint().


Comments

One response to “GetPoint with Enter states "Invalid Point" instead of returning – Change in behavior”

  1. you can also use Editor.GetPoint
    with PromptPointOptions parameter
    Dim ed As Editor = Autodesk.AutoCAD.ApplicationServices.Application.
    DocumentManager.MdiActiveDocument.Editor
    Dim optPoint As New PromptPointOptions(“Your message”)
    optPoint.AllowNone = True
    Dim resPoint As PromptPointResult = ed.GetPoint(optPoint)

Leave a Reply to Matus BrlitCancel reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading