THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/04/2012 at 07:47, xxxxxxxx wrote:
Maxon,
Please provide me(us) the python code to execute these buttons.
They are executed differently from the other buttons.
Here is a C++ example of executing the Apply button on the TransformTool:
CallCommand(200000069); //Launch the Transfer Tool
LONG tool_id = doc->GetAction(); //Get the active tool
BasePlugin *tool = FindPlugin(tool_id, PLUGINTYPE_TOOL); //Get the tools id
if (!tool) return FALSE;
/////////// This section of code is used to execute the Apply button ///////////////
BaseContainer bc(BFM_ACTION); //Create a container with an action id
bc.SetLong(BFM_ACTION_ID, MDATA_TRANSFER_); //Executes the transfer tool's apply button
bc.SetLong(BFM_ACTION_VALUE, TRUE); //Not sure if this is actually needed or not
DescriptionCommand dc;
dc.id = DescID(DescLevel(MDATA_APPLY, DTYPE_BUTTON, tool->GetType()));
DescriptionCheckUpdate du;
du.doc = doc;
du.descid = &dc.id;
du.drawflags = 0;
tool->Message(MSG_DESCRIPTION_COMMAND, (void* )&dc);
tool->Message(MSG_DESCRIPTION_CHECKUPDATE, (void* )&du);
tool->Message(MSG_DESCRIPTION_USERINTERACTION_END);
tool->Message(MSG_TOOL_RESTART);
//////// End button code ///////////////////
Please provide me(us) with the python code version of this.
Thanks,
-ScottA