shiroi
04-17-2006, 12:01 PM
Hello!
I tried to write my first coffee plugin. I want to read and switch the "select only visible" option from the selectiontool. But now I am stuck. Please help.
I am able to print out the ID of the active tool. So i am able to compare if its the right tool active. The SDK tells that it is also possible to access the parameters of the active tool. But I dont understand how.
The SDK says:
[BaseList2D] GetActiveTool(); Returns the currently active tool. You can use this to access tool parameters, like doc->GetActiveTool()#MDATA_MAGNET_RESTRICT_X. You can also find out which tool is active with doc->GetActiveTool()->GetType()==ID_MODELING_MAGNET_TOOL.
Using "doc->GetActiveTool()->GetType()" I got the ID. But how do I access the parameters?
Can you please give me a little bit of coffecode as an example?
Thanks for your help
I tried to write my first coffee plugin. I want to read and switch the "select only visible" option from the selectiontool. But now I am stuck. Please help.
I am able to print out the ID of the active tool. So i am able to compare if its the right tool active. The SDK tells that it is also possible to access the parameters of the active tool. But I dont understand how.
The SDK says:
[BaseList2D] GetActiveTool(); Returns the currently active tool. You can use this to access tool parameters, like doc->GetActiveTool()#MDATA_MAGNET_RESTRICT_X. You can also find out which tool is active with doc->GetActiveTool()->GetType()==ID_MODELING_MAGNET_TOOL.
Using "doc->GetActiveTool()->GetType()" I got the ID. But how do I access the parameters?
Can you please give me a little bit of coffecode as an example?
Thanks for your help
