.NET

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

AcquirePoint Problem

175 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 (175 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 (175 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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community