Cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

Copy Many Objects from a Model many times. Is possible to have inheritance concept in here?

Pioneer
Pioneer

Good evening,

I can't figure out if it is possible to copy more than one object from a frame many times and have inheritance concept on the copies. I explain better my problem with an example in the image and in the file attached. 

Looking in the image I have some copies of my Master1 in 3 slaves( Child 1, Child 2 and Child3, ecc).

I want to create a Class equal to my Master 1 so that every time I modify a part of it all the corrisponding parts in the children will be modified accordingly.

For example if I Modify the lenght of the "line a" in my master the corrisponding line in the child will be modified.

 

I know that is possible to have many adult and child frame but what if I want to have an overall looking of my plant without entering in each child frame individually?

 

I hope that my problem is clear and thanks in advance.

Diego

4 REPLIES 4

Re: Copy Many Objects from a Model many times. Is possible to have inheritance concept in here?

Phenom
Phenom

Hi @Diego3 

 


I want to create a Class equal to my Master 1 so that every time I modify a part of it all the corrisponding parts in the children will be modified accordingly.


It is possible and simple, put your objects inside a frame, let's say Master1, drag and drop it to a folder in the Class Library. This way you will create your object class. After that, insert copies of it just like you do with other built-in objects, drag it to a frame. You could also start a frame in the class library, build your scenario then insert it into frames as I described above.

 


For example if I Modify the lenght of the "line a" in my master the corrisponding line in the child will be modified.


For modifications, remember to do them in the class object (origin).

Best Regards,
Paulo Araujo

Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution.

Re: Copy Many Objects from a Model many times. Is possible to have inheritance concept in here?

Pioneer
Pioneer

Ok thanks for your quick answer! 

However is not clear to me how I can visualize in my " root frame" not just the icon of the frame but the inside objects.

EXAMPLE:

Imagine that I want to do some experiments of the plant that i attached before. In the first experiment I want a lenght of the "line 1a" ,and its corrispondent lines in the slaves, of 1 meter,while in the second experiment I want a lenght of 2 meters of master "line a" and slaves ones.

My question is :

is possible to modify just the lenght of "line a" of the master and automatically all the other lenghts of the slaves change?

 

My requirement is to have a total vision of the plant without having to open the object "Frame".

 

As you can see from the attached file I created a class called Master1 in the class library inside the folder MUs.

I undestood the concept that if now I modify from the original class some variables then the "child frame " inside my root frame will notice this change. In order to see this change however i have to open the square block "frame" and see the changed parameter.

 

What I want to obtain is a class of objects equal to the master 1( in the image) that is responsible of the changes of all the successive child objects and If I change a dimension in the master immediately all the other childs are sensible of this change.

 

Thanks for your help

Diego

 

Re: Copy Many Objects from a Model many times. Is possible to have inheritance concept in here?

Phenom
Phenom

@Diego3 

 


However is not clear to me how I can visualize in my " root frame" not just the icon of the frame but the inside objects.


You could create a Glass Box Frame

 

glass.png

 

or, if you have a Model Frame, go to its 3D Properties and "Show its contents"

 

show.PNG

 


is possible to modify just the lenght of "line a" of the master and automatically all the other lenghts of the slaves change?

If you change some parameter in the Class, it will be propagated. That is how inheritance works inside Plant Simulation. 


What I want to obtain is a class of objects equal to the master 1( in the image) that is responsible of the changes of all the successive child objects and If I change a dimension in the master immediately all the other childs are sensible of this change.

You already did it, working with classes will do it for you automatically.

 

EXAMPLE:

Imagine that I want to do some experiments of the plant that i attached before. In the first experiment I want a lenght of the "line 1a" ,and its corrispondent lines in the slaves, of 1 meter,while in the second experiment I want a lenght of 2 meters of master "line a" and slaves ones.

In the first experiment, you would change the Class. In the second experiment, you could change it all children as you want, i.e., you break the inheritance of the desired parameters and make all desired changes in each child. To restore the previous behavior, active inheritance in all modified parameters by using that little square beside them (gree - inheritance is active, yellow - inheritance is not active).

Best Regards,
Paulo Araujo

Did you like the answer? Then click the Thumbs Up button.
Did the answer solve your problem? Then accept the answer as solution.

Re: Copy Many Objects from a Model many times. Is possible to have inheritance concept in here?

Pioneer
Pioneer

Thanks Paulo , my problem was SHOW CONTENT not active !

I am happy now!

See you in my next question Smiley Happy