Cancel
Showing results for 
Search instead for 
Did you mean: 

How to move a object to the background by Simtalk?

Valued Contributor
Valued Contributor

Hi,

 

I want to hide a global variable behind other objects. But these objects were created before the variables.

I did not find a way how to move the variables into the background by Simtalk. I read in the help that the position is connected with the node number. But how can I change this number by Simtalk?

 

Thanks for any help!

9 REPLIES

Re: How to move a object to the background by Simtalk?

Legend
Legend

Change the color of the variable to match it to the background

 

Sachin

Re: How to move a object to the background by Simtalk?

Valued Contributor
Valued Contributor

I already did that. But if there are  other objects it will be visible.

Re: How to move a object to the background by Simtalk?

Siemens Phenom Siemens Phenom
Siemens Phenom

If you also set it to transparent after matching its color to the background and use the "Send to Back" command it shouldn`t be visible anymore. Did you also try that already? 

Kind regards,

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


Re: How to move a object to the background by Simtalk?

Valued Contributor
Valued Contributor

I also set it transparent but I don't know how to "send it back" automatically by Simtalk. I know how to do it manually but that doesn't help me because I create the objects automatically.

Re: How to move a object to the background by Simtalk?

Siemens Phenom Siemens Phenom
Siemens Phenom

As I understood it your focus is to create a global variable without having it in the frame itself. You could also do so by declaring an user defined attribute in your frame with the "createAttr()" method like this

 

root.createAttr("MyCustomVariable", "real") 

You need to pass the method the desired name of your variable and the desired data type as shown in my example. Would that also work for you?

 

Kind regards,

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


Re: How to move a object to the background by Simtalk?

Legend
Legend

can you please send a sample model. Its hard to understand and give a proper solution. 

 

There is no command for sending it back of all the other frames( not that i know of). However when you create a new object over the old one the new one is automatically on the top. Secondly if you are putting any mu on the created objects then you should know that mu remains always on the top. 

 

 

Sachin

Re: How to move a object to the background by Simtalk?

Valued Contributor
Valued Contributor

Sadly, I need the DDE functionality, which is only provided by the global variables. Otherwise I wouldn't use global variables and do it as you suggested.

Re: How to move a object to the background by Simtalk?

Valued Contributor
Valued Contributor

@Sequencing

 

I do not think that it is necessary to send a model.

It is possible to send an object to the background or foreground by right-clicking on it -->arrange symbols --> forground /background.

 

All I want to know is whether this funcionality is also usable by Simtalk. As it looks it is not.

Re: How to move a object to the background by Simtalk?

Legend
Legend

Yes Indeed. I was asking for model because there are multiple ways to do things in plant sim. By looking at the model what you want to do, I could have suggested you some alternative way . I hope you find what you are looking for.

 

Great day!

Sachin