Here is presented a way to make a custom button on a custom menu allocating a macro name in X5
How is possible to do that in X8. Should we follow the same logic?
Yes is the same logic
Thanks!
But where to find DRAWUIConfig.xml to firstly make a backup? Or its equivalent for X8... In Workspace folder does not exist any folder and any xml file. Should I neglect this recommendation and just start creating the recommended files in Addons folder? Is it safe?
I could easily understand and adapt the menu/buttons names but I cannot link them to existing macros.
I tried inserting dynamicCommand="GSM_Name.Module_Name.Sub_Name" in the button element but nothing happens when pressed...
Is it something different against X5 example? Is it something else to be add?
Thanks in advance!
Two important tips, not use the attribute type
and use the attribute dynamicCategory="2cc24a3e-fe24-4708-9a74-9c75406eebcd"
<itemData userCaption="Menu 01" guid="4581B6AE-549A-4C52-8369-77F374F893D9" enable="true" dynamicCategory="2cc24a3e-fe24-4708-9a74-9c75406eebcd" dynamicCommand="Bonus.Macros.Macro1"/>
This is what I used but nothing happens. No macro is called:
1 2 3 4 5
<itemData userCaption="XML_Creator" guid="4581B6AE-549A-4C52-8369-77F374F893D9" dynamicCommand="XML_Creator.Applications.ShowFormXMLCreator" dynamicCategory="2cc24a3e-fe24-4708-9a74-9c75406eebcd" enable="true" type="button" />
Shell I delete type="button"?
yes, remove type="button" attribute
Yes, it did the trick...
One more thing to be clarified, please:
In both existing articles (the one for X5 posted above and one for X7 here) the xslt file setting where the custom controls would be added is named 'UserDraw.xslt'. In your example the file name is 'UserUI.xslt'. Is that specific to X8 and higher versions or what? Should it work also with the first name instead of the (tested) second?
I use the second name in X7 and works, but i never test the first
OK. I just wanted to know if you would know something on the issue. I will test that after solving my real project.
Thanks anyhow!