Mode to state (or vice-versa)

If one realises that what was done as a state machine should have been a mode machine (or vice-versa)… is there a way to change it wi the out much fuss (I.e., without doing it all over?)

Cheers

Hi @rreis,

I’m not completely confident on this, but I don’t believe there is an easy way to achieve this. If your state machines are vast there would probably be a way of scripting the change. Whether you consider this as “much fuss” you’ll need to determine. Otherwise I suspect you’ll have to hand-craft the MSM views again.

You could, of course, simply ignore the semantic difference between these two elements and avoid any rework at all. Whether this is sensible in your situation you’ll need to think about.

Alright. Measure twice, cut once :slight_smile:

I was thinking if there is some area in the model where “flags” could be flipped from State to Model as the machine is the same.

Or, by other words, how does “Capella” “knows” it is something or the other ?

If you look in .aird file you will find that these object are typed Mode or State.
I don’t find nothing to change from one to another.
Moreover, the two definitions cannot coexist on the same diagram, which I think explains why it is impossible to switch from one to the other.
A script to try modifying the .iard file seem to be the only solution, but It’s really risky

1 Like