I have a situation, where RhinoDoc.BeforeTransformObjects fires two times, despite it was initialized only once and depsite I do not perform any transformation (inside this event). Is that normal behaviour?
I’ve noticed, that it happens only when I open existing document, but not when I create new empty document.
Wild guess: are there any blocks in the file?
That’s right. The file I am using has geometry imported from fbx, source of file is Navisworks. All objects has been imported as blocks of meshes. I have exploded geometry into individual meshes, but empty block definitions are still existing in the object. So what does it mean?
Because you get a RhinoDoc.BeforeTransformObjects fired in existing files and not in empty documents, I wondered if it was caused by something (blocks) in the document.
I have no experience with this but was merely trying to brainstorm a possible cause, as it could hel tracking down a solution/workaround.
Does the firing also happen in files without a block?
Maybe I best leave it up to someone else more knowledgeable, to answer as I might be sending you off on a wild-goose chase.
OK, so I have a solution. I am initializing the BeforeTransformObjects in MainPanel() constructor. Each time i open new file in the same instance of the Rhinoceros I have one event more triggered. First event is triggered when I open Rhino with empty file, second when I open existing document, and so on. In my opinion this is strange behaviour.