Agreed!
I created a Model-Based Add-in for one of my clients which automatically adds legend (or legends) to diagrams that require them. This is a massive productivity aid to them and apart from saving time it also ensures all diagrams are consistent across all models.
So how does Repository.Execute() feature.
Well, there is no API function to create a Legend. Therefore it is all performed in the script. Involving, writing a an entry into that well known cross-reference table t_xref.
Repository.Execute() is required to insert a row per legend.
Yes, I did perform extensive research to ascertain exactly what is required in the t_xref row, so as not to corrupt anything.
For me, the only work arounds would be:
- Inform the client to revert to manual addition of legends
- Wait for a Create Diagram Legend function to be added to the API, along with most likely a Legend Class
Until then I believe they will not be upgrading to EA v17.2
Phil