Hi. We would like to check if a tab with some caption (eg. My Tab) already exist or not. if not existing, create the tab dynamically/programmatically and if exist, add the new button/group in that tab. Is that possible to dynamically/programmatically create the tab?
Use case will be, if there will more than one developer creating buttons/functions but want only to add those buttons in one similar tab without adding a new tab with the same caption multiple times.
You can't directly add button to tab. You can add button to group in tab. You can update every group if you know id of the group. How to insert button into a group owned by different module you can find here:
ProGuide Buttons · Esri/arcgis-pro-sdk Wiki · GitHub
Change refid to your group id.
You can create one add-ins with tab and group but without buttons. In other add-ins you can reuse first add-in infrastructure to place buttons or other controls.
Hello, can this be done programmatically or only using the config.daml files for each of the new buttons that will be added in a group on the same Tab without knowing the ID but caption of the tab?
I haven't seen code like that. I know that there is possibility to change caption or image of existing button from code. All things with user interface you can access via FrameworkApplication.GetPlugInWrapper. Try to investigate on that direction.
Yeah. Found that method/property (FrameworkApplication.GetPlugInWrapper) but it is asking only for the id from the DAML file. We cannot provide the ID that is why we want to loop over the config.daml and look for it there using the caption (My Tab) then, append/add if not exist or update and add the group there.