Enable selected objects only

Hi there,

Does anyone know how to enable/disable “Drag selected objects only” option using RhinoCommon?

Thank you in advance
Will

Hi William,

Here is a way to do it in Python/RhinoCommon:

import Rhino
import rhinoscriptsyntax as rs

settings = Rhino.PlugIns.PlugIn.GetPluginSettings(Rhino.RhinoApp.CurrentRhinoId, False)
s = settings.GetChild("Options").GetChild("Mouse")

s.SetBool("EnableUnselectedObjectDrag", False)
Rhino.PlugIns.PlugIn.SavePluginSettings(Rhino.RhinoApp.CurrentRhinoId)

Hello Jarek,

Thank you, that works perfectly!

Will.