kotchwane
kotchwane

Reputation: 2404

Display description of a component in Dymola

In Dymola, I can display the name of a component in a TextBox by using the syntax %name. I can also display its class (%class), its path (%path) and any of its parameter (%name_of_parameter).

But I can't find how to display the "Comment" field. %comment does work on Wolfram, but doesn't seem to work in my version of Dymola. Is there any way to do that, or do I need to create a custom "DisplayedName" parameter?

Upvotes: 3

Views: 124

Answers (1)

marco
marco

Reputation: 6645

The Modelica Specification defines in chapter 18.6.5.5 which text macros exist, but it does not contain %comment. It also does not mention any other way to access the description.

It looks like Wolfram decided to add it, but there is nothing like this in Dymola.

The Dymola user manual documents in the section Creating graphical objects (user manual 1b in Dymola 2022) under Tokens expanded in text strings what is supported. They added %path for example.

Upvotes: 4

Related Questions