Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Get the name of a component and write it as a string?

Get the name of a component and write it as a string?

Hey,
I have a circuit containing one model with different parameters a few times. This components contain a terminate() statement, the time before the terminate is executed depends on the parameters. So when I simulate, and the condition at one component is fullfilled it gives a string like "the component is full". What I wand to do is: "the component "componentname" is full". So is there a command to get the name of the component? and how would I add in the terminate statement?
terminate("The component" + StringVariable + "is full")  <- like this?

Re: Get the name of a component and write it as a string?

There are 0 guests and 0 other users also viewing this topic
You are here: