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

Promble with GetDistance(string)

1 REPLY 1
Reply
Message 1 of 2
laymanzheng
284 Views, 1 Reply

Promble with GetDistance(string)

I have a pick distance button in a .net form. I add following code for the pick button clicked event:

PromptDoubleResult result = AcadAppServices.Application.DocumentManager.MdiActiveDocument.Editor.GetDistance("Specify distance:");
if (result.Status == PromptStatus.OK)
{
double distance = result.Value;
}

Here're the steps to show the problem:
Open autocad, type netload to load the .net dll. Call command to open the form, click the pick button: (form hide -> specify a distance -> form show). Then Close the form, type textscr in the command line to open AutoCAD Text Window. Click close button "X" of the Text Window, but fail.

I try not to click pick buton and then cancel the form and open the AutoCAD Text Window, the text window can be closed normally. So I doult if there's some problem with the API AcadAppServices.Application.DocumentManager.MdiActiveDocument.Editor.GetDistance().

If anyone can have a look at this problem, I really appreciate.

Thanks much
1 REPLY 1
Message 2 of 2
fantum
in reply to: laymanzheng

No problem here. Need more code.

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