🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Difference between "Model" and "Diagram"

User: "Altair Forum User"
Altair Employee
Updated by Altair Forum User

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

Find more posts tagged with

Sort by:
1 - 3 of 31
    User: "RoKet"
    Altair Employee
    Updated by RoKet

    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

    User: "Fady Nassif_21652"
    Altair Employee
    Updated by Fady Nassif_21652

    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

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    Thank you, Fady and Ronald.