RhinoDoc.BeforeTransformObjects

Hello,

There seems to be a bug in RhinoDoc.BeforeTransformObjects event, when raised you receive in args the number of the objects transformed, but the RhinoObject array is always null:

int e.ObjectCount = n -> (1,2,3…)
RhinoObject e.ObjectCount = null

Here a screenshot:

Best Regards

Thanks, I added this to our bug tracking system at
https://mcneel.myjetbrains.com/youtrack/issue/RH-34561
and will try to take a look at it soon

I see the bug and just fixed it a few minutes ago. This may not show up in the WIP until next week. Thanks for the report

Thanks for let me know.

Kind Regards.

Good afternoon Steve
I’ve got the same issue, is it supposed to be fixed also for Rhino 5?
I tried to update the sdk but all the same…

Here is my code:

’ RhinoDoc.BeforeTransformObjects event handler

    Public Shared Sub OnTransformRhinoObjects(sender As Object, e As DocObjects.RhinoTransformObjectsEventArgs)
        RhinoApp.WriteLine("** EVENT: Transform Objects **")
        RhinoApp.WriteLine(e.ObjectCount & " objects will be transformed")
        RhinoApp.WriteLine("Transformation:" & e.Transform.ToString)
        For Each tp In e.Objects
            RhinoApp.WriteLine(tp.Attributes.Name)
        Next
    End Sub

Best Regards

Hi Matthieu,
This was most likely not changed in Rhino 5. Have you tried this in the V6 WIP?

No, but my end user has Rhino 5, so I wish to stay with this one.

I’m trying to use the RhinoDoc.SelectObjects event instead to redraw my custom objects, but as it is raised very frequently I fear to slow down Rhino.

We typically almost never have to use an event watcher for any sort of custom geometry drawing. If you are using a display conduit, you will get called for drawing at the appropriate time.