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

Get a point with snap using a jig

1 REPLY 1
Reply
Message 1 of 2
hericson
581 Views, 1 Reply

Get a point with snap using a jig

I have a jig that I use to select an endpoint. But the jig will only return the position of the mouse. If I snap to end point for example and click a little bit from the endpoint I will not get the endpoint. What should I do?

{code}
' Sampler captures mouse movements while asking for a point
Dim jigOpts As JigPromptPointOptions = New JigPromptPointOptions(vbLf & "Select endpoint:")
jigOpts.UserInputControls = UserInputControls.NullResponseAccepted
myPR = prompts.AcquirePoint(jigOpts)
If myPR.Value.IsEqualTo(BasePt) Then
Return SamplerStatus.NoChange
Else
BasePt = myPR.Value
Return SamplerStatus.OK
End If
{code}
1 REPLY 1
Message 2 of 2
Anonymous
in reply to: hericson

A jig's sampler doesn't give you osnapped-to points,
because they're considered 'tentative' until the user
clicks the mouse button to pick the point.

If you want the osnapped-to point while the user is
dragging, you have to use the Editor's PointMonitor
event in conjunction with your jig.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2011

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message news:6387205@discussion.autodesk.com...
I have a jig that I use to select an endpoint. But the jig will only return the
position of the mouse. If I snap to end point for example and click a little bit
from the endpoint I will not get the endpoint. What should I do?

{code}
' Sampler captures mouse movements while asking for a point
Dim jigOpts As JigPromptPointOptions = New JigPromptPointOptions(vbLf &
"Select endpoint:")
jigOpts.UserInputControls = UserInputControls.NullResponseAccepted
myPR = prompts.AcquirePoint(jigOpts)
If myPR.Value.IsEqualTo(BasePt) Then
Return SamplerStatus.NoChange
Else
BasePt = myPR.Value
Return SamplerStatus.OK
End If
{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