Template Tables

There's probably an easy way to do this, but I am looking for a way to create a generic table as a template in a project usage that, when copied, will relate back to the template table. The goal is that if there is a change to the template, I can script updating all the instantiations of that template (thousands). These tables are of various scope, element types, and some have complex custom columns.

 

Ideally, we are looking for a way to do this that does not rely on creating relationships back to the template and it's just a simple copy/paste/re-scope of the template for the user. We tried creating a custom stereotype with a tag value. You apply that stereotype to the template and add the template itself as the tag value. Idea being when you copy the template, you also copy the tag whose value is the template. However, when copying the table, Cameo sets that tag value to the copied table as shown below.

 

We’ve thought of just referencing the template name in the tag, which should work, but the template name may change without someone remembering to go update the tag value. We’ve also thought of referencing the template’s element id as a string field, but Cameo will convert it to the server id. That may still work, but in our script, we would need to first get the server id for every possible corresponding template element id.