Help - Search - Members - Calendar
Full Version: "If" with "redeclare record"
Modelica Forum > Modelica > Modelica
jerome-gmc
Hello,


In my task to customized the interface of my model, I would like to change a "record" according to a choice come from another part of the model. For that I need to know the syntax of "if" with a "record":

The idea is to do that, but the syntax is not right:

CODE

if Mygeometry == 1 then
redeclare record Geometry = MonModel.Geometry1
end if


Somebody can help me?


Thank you in advance.

Bye
JOKOE
Hello,

maybe you can try it this way in the declaration part (before keyword equation):


redeclare record Geometry = NonModel.Geometry1 if Mygeometry==1;

Hopefully it helps

Bye

JOKOE
jce
ZITAT(JOKOE @ Sep 6 2006, 06:42 PM) *

maybe you can try it this way in the declaration part (before keyword equation):
redeclare record Geometry = NonModel.Geometry1 if Mygeometry==1;


Hmm, this should work with simple declarations as of Dymola 6/Modelica 2.2. (See Dymola 6 Additions User's Manual, page 32.) Maybe, it also works with redeclarations?

Best regards ,
Jonathan
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.