.NET

Reply
Active Member
lapiseast
Posts: 8
Registered: ‎09-21-2006
Message 1 of 3 (186 Views)

AcquirePoint Problem

186 Views, 2 Replies
09-21-2006 11:32 PM
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;
}
}
*Tony Tanzillo
Message 2 of 3 (186 Views)

Re: AcquirePoint Problem

09-22-2006 06:41 PM in reply to: lapiseast
Have you tried removing UserInputControls.AcceptMouseUpAsPoint ?

That would only make sense if the call to AquirePoint() was
issued while the mouse button is currently down, no?

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com

wrote in message news:5337772@discussion.autodesk.com...
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;
}
}
Active Member
lapiseast
Posts: 8
Registered: ‎09-21-2006
Message 3 of 3 (186 Views)

Re: AcquirePoint Problem

10-17-2006 01:33 AM in reply to: lapiseast
thanks tony for your reply.
i removed AcceptMouseUpAsPoint in the UserInputControls,but still doesn't work.
while from keyboard input cordinate of a point in the format of "x,y,z" ,i could find that the dres.status(return value of prompts.AcquirePoint()) is PromptStatus.Ok,but dres.value can not get the keyboard-input value. So.something will be created at the place where the cursor stayed at that time,but not the place what keyboard-input point defined.

another truth is , i have another custom class derived from EntityJig,and in the Sampler override ,i also used AcquirePoint method which is completely the same as that one of DrawJig,from UserInputControls setting to the method make use of dres.value. but here,the user input from keyboard works well.

does that the difference of DrawJig and EntityJig ?
anyone has encountered the same problem?pls. help me
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!