That procedure is interesting.
(First, let me explain my setup: I have a block, with another block as a part property, multiplicity 1..*. The part property's classifer has an enumeration literal with three values: NotSet, True, False. NotSet is the default. Create an instance tree. Then try to increase the multiplicity of the part property. When I create the instance table, I use the top-level instance specification object as the Scope.)
Following the way you suggest (using Create button in the instance table):
- New instances are not named consistently with prior instances
- But you can rename them (tedious)
- Adding them as slot values makes everything work as expected
- Interestingly, the first created instance (the one that is always present since the multiplicity is 1..*) never shows in the instance table. Even before trying to add more instances. It's like it's not an instance object at all. (If I change the scope to the package the top-level instance specification is in, the first instance does show in the table.)
If I use the Clone with parts:- Name of new instance is consistent (same name, incremented number)
- In my case, my only sub-property is an enumeration literal... I get the instance (with all sub properties, matching the other instances I've created/renamed manually)
- I also get an additional Enumeration literal. It has the exact same ID as the one under the instance and if I delete it, everything under the instance is removed as well. So there are two representations of the exact same object in the containment tree.
- If I simulate my top-level instance and find the cloned instance, I cannot set any value for the enumeration in the simulation's variable window, value column. Enumeration literals in created instances are changeable.
- The only mention on the web I can find for the clone button is: https://docs.nomagic.com/display/CSM190 ... rsion+News This is not very helpful to dig deeper into this (seemingly) strange behavior.
- However, if I set the enumeration literal in the instance table (to a non-default value, True), the two enumeration literal objects have different IDs and I can delete one without deleting the other.
So, it looks like using create and renaming for consistency is probably the best option.
Or, the best option is just to right-click on the item in the simulation's variables window and select "Add Value" as many times as you need instances (since then you dont even have to rename).
Sigh. Looks like lots of clicking no matter what.
Is the method in the video linked in the top post to build out a specific instance of a block topology not used?? It feels like I'm doing something that is not normal, or at least not fully thought out.