Message 1 of 7
InteractionEvents and SelectEvents: Select midpoint in sketch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
This is about the Select Event.
I'm writing a macro to add an new constrain in the sketch environment. It is a combination of the Vertical and the horizontal constrain.
First the user can select 2 points (just like the vertical and horizontal constrain commando)
Than the macro calculate, based on the angle between the 2 points, witch constraint to use
and the apply the right horizontal or vertical constraint.
With this macro you cant miss with aligning 2 points using vertical or horizontal constraint.
The problem is in the first step. I want the selection filter of the macro exactly the same as the selection filter of the constraint commando. Problem now is that I cant select midpoints of a line (the green dot that appears when you hover over the midpoint) Anyone an idea ?
for the selection I'm using the InteractionEvents with SelectEvents
(Almost the Exact example in the programming help of inventor 2009)
[...]
' Set the filter using the value passed in.
oSelectEvents.AddSelectionFilter kSketchPointFilter
' Start the InteractionEvents object.
oInteractEvents.Start
' Loop until a selection is made.
Do While bStillSelecting
DoEvents
Loop
[...]
Ask if someone is interested in more information
kind regards
Klaas De Smedt
I'm writing a macro to add an new constrain in the sketch environment. It is a combination of the Vertical and the horizontal constrain.
First the user can select 2 points (just like the vertical and horizontal constrain commando)
Than the macro calculate, based on the angle between the 2 points, witch constraint to use
and the apply the right horizontal or vertical constraint.
With this macro you cant miss with aligning 2 points using vertical or horizontal constraint.
The problem is in the first step. I want the selection filter of the macro exactly the same as the selection filter of the constraint commando. Problem now is that I cant select midpoints of a line (the green dot that appears when you hover over the midpoint) Anyone an idea ?
for the selection I'm using the InteractionEvents with SelectEvents
(Almost the Exact example in the programming help of inventor 2009)
[...]
' Set the filter using the value passed in.
oSelectEvents.AddSelectionFilter kSketchPointFilter
' Start the InteractionEvents object.
oInteractEvents.Start
' Loop until a selection is made.
Do While bStillSelecting
DoEvents
Loop
[...]
Ask if someone is interested in more information
kind regards
Klaas De Smedt
=================================
If this is the solution, push the solution button 😉 (and maybe some kudos)
Autodesk Product Design Suit - Ultimate edition (Subscription)
If this is the solution, push the solution button 😉 (and maybe some kudos)
Autodesk Product Design Suit - Ultimate edition (Subscription)