focus userdata

On 25/10/2017 at 16:49, xxxxxxxx wrote:


is there any way to set the focus to any userdata item or the "userdata" tab itself ? Similar to the "doc.SetActiveObject" function ?

Thanks !

On 26/10/2017 at 01:48, xxxxxxxx wrote:


it is not possible to set the user input focus to a certain parameter in Attribute Manager.

But under certain limitations ActiveObjectManager_SetObject() can be used to select a tab (in your case "User Data") in Attribute Manager.

First you need to make sure the object is selected in Object Manager, e.g. via BaseDocument.SetActiveObject().

And then for example like so (op being the currently selected object) for the User Data tab:


Note: In certain cases the DescID for the tab can not be specified in this short and simple manner, but needs the more complete version, i.e. in case of a tab showing tag parameters.
Like so (using Trestriction (ID of Restriction tag) as an example) :

c4d.gui.ActiveObjectManager_SetObject(c4d.ACTIVEOBJECTMODE_OBJECT, op, c4d.ACTIVEOBJECTMANAGER_SETOBJECTS_OPEN, c4d.DescID(c4d.DescLevel(c4d.ID_TAGLIST), c4d.DescLevel(c4d.Trestriction)))

As mentioned before this method has a bunch of limitations. Not saying my list is complete, but here are a few:
- There's no way to specify the Attribute Manager, if multiple are open.
- It's not possible to specify multiple tabs in parallel.

On 26/10/2017 at 12:02, xxxxxxxx wrote:

Hi Andreas,

brilliant !

It takes some time (at least for me) to get the hang of handling the DescIDs and DescLevels in order to target the corresponding tabs but now it works perfectly :slightly_smiling_face:

Thanks for your answer and also for mentioning the limitations.

best regards,