Symbols in ValueType are not handled correctly

0 votes
asked Jan 17 in Bug by g.edward.roberts (480 points)
look at

@startuml
!include http://material.elparazim.com/library/SysML.1.6.puml
class C {
Compartment(attributes,true)
anAttribute : Integer
areaInProduction : AreaInAcres (acres) {redefines areaInAcres}
}

class AreaInAcres <<ValueTyhpe>> {
  Compartment(<<ValueType>>,true)
  quantityKind = Area
  units = Acres
}

object "__Acres : Unit__" as Acres {
  symbol = "acres"
}

@enduml

look at areaInProduction : AreaInAcres (acres)  .. this is an example from SysML using ValueTypes... one can have a symbol which one can use in the definition of a Type... the (acres) send this into the next Compartment... because I think it is thinking that this is an operation... but it is not...

2 Answers

0 votes
answered Jan 17 by plantuml (229,920 points)
Sorry, I'm confused here.

Can you post a minimal example that shows the issue ? Try to have the shorter possible example, without using the preprocessor.

Thanks!
commented Jan 17 by g.edward.roberts (480 points)
Sure... just do...

@startuml
class C {
anAttribute : Integer
areaInProduction : AreaInAcres (acres) {redefines areaInAcres}
}
@enduml

my other longer example is there to show you a simple SysML example with ValueTypes and why such a syntax is necessary...
0 votes
answered Jan 17 by plantuml (229,920 points)

There is an not-very-documented option that can be used to force field interpretation :

@startuml
class C {
anAttribute : Integer
{field} areaInProduction : AreaInAcres (acres) {redefines areaInAcres}
}
@enduml

Does it help ?

...