SampleEventWatcher

@dale
We need to listen the OnSelectObject event while running go.GetObjects(1, 0). We can do it with Rhino 6, but Rhino 5 has a different behavior.

SampleEventWatcher.zip (22.4 KB)
We made small change to your project (CCommandSampleEventWatcher::RunCommand). Please compile the attached project with “PseudoDebug” (it is a Rhino 5 project), run “SampleEventWatcher” and select curves - you can see that OnSelectObject is not called while the command is running.

In Rhino 6, OnSelectObject just works. Could you tell us how to listen the OnSelectObject event while running go.GetObjects(1, 0) in Rhino 5? Many thanks.

Hi @XNurbs,

The sample seems to be working here. Here is the output of the SampleEventWatcher command when selecting 3 curves:

Command: SampleEventWatcher
Select curves and points:
** EVENT: Select Object **
Select curves and points. Press Enter when done:
** EVENT: Select Object **
Select curves and points. Press Enter when done:
** EVENT: Select Object **
Select curves and points. Press Enter when done:
** EVENT: End Command **
** EVENT: Deselect All Objects **
** EVENT: Undo, Type: End Recording **
** EVENT: Undo, Type: Purge Record **

What am I missing?

– Dale

@dale
Fillet1.igs (3.5 KB)
Please try the attached iges model. (This is related to the model format.) How to fix it?

Hi @XNurbs,

I have confirmed that, unlike Rhino 6, sub-object selection does not trigger a `CRhinoEventWatcher::OnSelectObject`` event. There is nothing we can do about this.

Just curious, when you in the middle of selecting objects, why do you need to be notified that you are selecting?

– Dale

Once users select a curve, XNurbs may generate a surface on the fly.