Message 1 of 3
AcquirePoint Problem
Not applicable
09-21-2006
11:32 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
when override drawjig::sampler() function, i use the AcquirePoint() to get the point. The problem is that the 3dcoordinate point input from keyboard doesn't works, anyone knows what's wrong?
My code snippet list as below:
protected override SamplerStatus Sampler(JigPrompts prompts)
{
JigPromptOptions jigOpts = new JigPromptOptions();
jigOpts.UserInputControls = (UserInputControls.Accept3dCoordinates|UserInputControls.AcceptMouseUpAsPoint | UserInputControls.NoZeroResponseAccepted | UserInputControls.NoNegativeResponseAccepted
);
jigOpts.Message = "input the point:";
PromptPointResult dres = prompts.AcquirePoint(jigOpts);// just here the keyboard doesn't work
if (dres.Status == PromptStatus.Cancel)
{
return SamplerStatus.Cancel;
}
if (ToSymbolCreateData(m_CreateData).Position != dres.Value)
{
ToSymbolCreateData(m_CreateData).Position = dres.Value;
return SamplerStatus.OK;
}
else
{
return SamplerStatus.NoChange;
}
}
My code snippet list as below:
protected override SamplerStatus Sampler(JigPrompts prompts)
{
JigPromptOptions jigOpts = new JigPromptOptions();
jigOpts.UserInputControls = (UserInputControls.Accept3dCoordinates|UserInputControls.AcceptMouseUpAsPoint | UserInputControls.NoZeroResponseAccepted | UserInputControls.NoNegativeResponseAccepted
);
jigOpts.Message = "input the point:";
PromptPointResult dres = prompts.AcquirePoint(jigOpts);// just here the keyboard doesn't work
if (dres.Status == PromptStatus.Cancel)
{
return SamplerStatus.Cancel;
}
if (ToSymbolCreateData(m_CreateData).Position != dres.Value)
{
ToSymbolCreateData(m_CreateData).Position = dres.Value;
return SamplerStatus.OK;
}
else
{
return SamplerStatus.NoChange;
}
}