I need to have an object selected prior to executing a command. I need to do this from within my CRhinoCommand::RunCommand method without any user interaction (no mouse selection from user with CRhinoGetObject). The object will be in a specific layer.
I understand you can get CRhinoObject* from CRhinoDoc::LookupObject, but it’s not clear how to set the state of the objects to selected using these pointers.
I may have missed something: The intention is to select from RunCommand without having to get the user to select with the mouse.
The idea is basically to get a pointer to the CRhinoObject* for the object and set its state to selected without any user interaction. Is this possible ?
When EnablePreSelect is set to true, then if pre-select objects available and pass the selection filter, provided by the object getter, then the object will be ‘selected’ and the user will not be prompted to pick anything.