It can sometimes be useful to use an OpaqueExpression to specify the value of a Slot. But if you do this with a value property typed, say, by a Real, you might find the value getting "stuck" on 0.0 in the inline Slot editor for an InstanceSpecification. One way to handle it is:
- Via the InstanceSpecification dialog select the Slot name (under Slots).
- If it does not already have a value you MUST first use the
Create Value
button to create one, which if it is a Real will by default create a LiteralReal 0.0. - Click the small
-
button at the bottom right to remove the Slot value row (do NOT use theRemove Value
button). - Hold your mouse over the name of the Slot then access Open Specification via the context menu, which brings up the entire Slot specification dialog.
- Select value in the Slot specification dialog then click the small
+
button. - Select Opaque Expression from the expanding menu right.
- Enter an OpaqueExpression that refers to names of value properties known to the final context in which the Slot will be used, then click
Close
thenClose
thenClose
.
There is a related tool problem:
If you are working with SysML Extension for Physical Interaction and Signal Flow Simulation (SysPhS) and Modelica, you might also encounter this: