Message 1 of 1
"PointInferenceEnabled" or Mouse Snaping
Not applicable
09-15-2011
10:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
A while back an issue with PointInferenceEnabled was posted. I was wondering if there was any update on this issue?
If not would there be any suitable replacements for this functionality? I am just looking for something that enables the snap feature with Mouse Events.
Here is my snippet of code if needed:
Private WithEvents objIEvents As Inventor.InteractionEvents
Private WithEvents objMouseEvents As Inventor.MouseEvents
Sub Builder(ByRef app As Inventor.Application, ByRef scaler As Double)
MyInventor = app
scales = scaler
'New InteractionEvents object.
objIEvents = MyInventor.CommandManager.CreateInteractionEvents
'Connect to the associated Mouse event.
objMouseEvents = objIEvents.MouseEvents
'Démarrer le processus.
objIEvents.Start()
objMouseEvents.PointInferenceEnabled = True
objMouseEvents.MouseMoveEnabled = True
Const AlternateLinearUnits = (11272)
'Set Dimensions to inches
Const AlternateLinearPrecision = (41729)
'set Precision to zero decimals
Dim d As Integer
d = 0
i = 0
End Sub
Private Sub objMouseEvents_OnMouseclick(ByVal Button As Inventor.MouseButtonEnum, ByVal ShiftKeys As Inventor.ShiftStateEnum, ByVal ModelPosition As Inventor.Point, ByVal ViewPosition As Inventor.Point2d, ByVal View As Inventor.View) Handles objMouseEvents.OnMouseClick
'Get location of mouseclicks
If Button = Inventor.MouseButtonEnum.kLeftMouseButton Then
x(i) = ModelPosition.X
y(i) = ModelPosition.Y
i = i + 1
If i = 4 Then
MsgBox("Select the Object")
End If
If i = 5 Then
Calc_Dim()
i = i - 1
End If
End If
End Sub