Difference between "Model" and "Diagram"

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

We can set a variable in the 'Model' and 'Diagram'.

Can you explain what is the difference and where the variables are possible to use?

It looks like there are difference between 'Model' and 'Diagram' variable's are used.

 

image.png.9639d7c74290cc608d4a946088869fbf.png

Welcome!

It looks like you're new here. Sign in or register to get started.

Answers

  • RoKet
    RoKet
    Altair Employee
    edited September 2018

    Hi Seoksan,

     

    The difference is in the visibility/accessability. Variables defined in 'Model' can be accessed from everywhere, variables defined in 'Diagram' can only be accessed in the corresponding context of the model or below. It's only important when you use Supercomponents, otherwise you just have one context in your model. Every Supercomponent has its own context.

     

    Regards,
    Ronald

  • Fady Nassif_21652
    Fady Nassif_21652
    Altair Employee
    edited September 2018

    Hi Seoksan,

     

    An example on what Ronald described:

    A variable defined in the model initialization can be used in the simulation setup, it is not the case if it is defined in the diagram context (top level).

     

    Thanks

     

    Fady

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited September 2018

    Thank you, Fady and Ronald.

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.