Add property information to huge number of elements at once

Started by Johan2, March 15, 2016, 06:24:58 AM

Previous topic - Next topic

Johan2

Is there a way to add property information to huge number of elements at once?

prgee

Hi,

I use the following "workaround" to add multiple properties to all (or a subset) of existing Archi model elements. You just have to export your model to CSV, edit the files as in the following example, and re-import them back into the model:

1. Export your model to CSV which results in  "myname-elements.csv", "myname-relations.csv" and "myname-properties.csv"
2. Delete the "myname-relations.csv" file since we don't need to re-import the relationships
3. Delete all rows from "myname-properties.csv" except the header since we are importing only the newly added new properties
4. Copy the "ID" column from "myname-elements.csv" then delete all rows except the header since we are importing only the properties
5. Paste the "ID" column values into the "ID" column of "myname-properties.csv"
6. Add the user property name to the "Key" column and its value in the "value" column then duplicate them to the subsequent rows
7. If you are adding multiple properties to each element you can duplicate the entire section for each additional property name
8. Make a backup copy of your Archi model file then re-import the "myname-elements.csv" and "myname-properties.csv" files which should look something like the following example:

myname-elements.csv:
ID,Type,Name,Documentation

myname-properties.csv:
ID,Key,Value
90f75b18,user-property-1,user-value-1
90f75b18,user-property-2,user-value-2
7a0272c1,user-property-1,user-value-1
7a0272c1,user-property-2,user-value-2
...
etc.

This process requires some familiarity with your spreadsheet software but is safe and since the CSV export/import operations are very fast it works well for very large models.

Regards,
Peter

Johan2

Peter, WOW, very usefull, will start using it.
Thanx!!!