How to get Button IDs?

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 17/11/2012 at 17:19, xxxxxxxx wrote:

Say for example I want to press the 'Exchange with Proxy' button (which seems to have no command listed for it) on a whole bunch of Xref objects in the scene via code, how do I figure out the ID of those buttons? I wish the script log/console would give some information when these buttons are pressed but I get nothing.

How do others figure this out?

For example I have an example code here written by Bret Bays but I have no idea how he found the ID for the button needed to make it work as I can't just drag the button into the command line like I can with other parameters and fields to see the ID.

  
def main() :  
  WeightTool_ID=1019499  
  WeightTool=c4d.plugins.FindPlugin(WeightTool_ID, c4d.PLUGINTYPE_TOOL)  
  c4d.CallButton(WeightTool,c4d.ID_CA_WEIGHT_TOOL_APPLY_SELECTED)  
  c4d.EventAdd()  

This is complicated I guess by the fact that the Xref is an object rather than a tool..stumped here in any case, so any ideas appreciated.

Cheers,
Brian

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 17/11/2012 at 18:23, xxxxxxxx wrote:

  
c4d.CallButton(op,c4d.ID_CA_XREF_SWAP)   
c4d.EventAdd()   

I guessed from the oxref.h file :)

Cheers
Lennart

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 17/11/2012 at 18:55, xxxxxxxx wrote:

Thanks Lennart, where did you find that file (oxref.h) ?

I guess a script to switch multiple Xrefs at once would have to select each in turn and press that button.. unless there's a simpler way I'm not thinking of, anyway this gives me a start on it, appreciate it.

Cheers,
Brian