I am using the code included in the template to add my macros to the ribbon, but I'm finding if the tab already exists in the ribbon, another tab with the same name is added.
I have customized the ribbon so that my field staff can do all of their tasks on a single ribbon, since they are not, and I do not expect them to be sophisticated TBC users.
I have a tab named Field that is loaded from a bin file that also hides a lot of tabs they will never use. If I do this in my .py file, I get another tab called field. It looks like I have to add my macros to the customized ribbon manually, but I'd rather not do that because deploying new macros becomes a challenge. Am I missing something here?
# if you want the macro included in the ribbon, fill in the following 5 lines
cmdData.DefaultTabKey = "Field"
cmdData.DefaultTabGroupKey = "Project"
cmdData.ShortCaption = "Clean Feature Codes"
cmdData.ToolTipTittle = "Clean Feature Codes"
cmdData.ToolTipTextFormatted = "Change Feature Codes so they run cleanly in TBC."
try:
b = Bitmap(macroFileFolder + "\\" + cmdData.Key + ".png")
cmdData.ImageSmall = b
except:
pass
------------------------------
David Brubacher
------------------------------