From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Moving a rectangle or change color in "Run-Time "?

First step, the objects of decoration you can modify its properties in "Run-Time "?

Moving a rectangle or change color in "Run-Time "?

I want to develop a mini SCADA application, where I have to do some animations usingsimple objects like Shapes.

0 Kudos
Message 1 of 2
(2,219 Views)

 

Yes, it is possible to modify decorations in runtime. An example is below.

 

decoration_properties_example.PNG

 

As you can see, you just need to get a reference to the front panel containing the decoraitions, and then use the Decos[] property to get an array of references to the decorations. These can be passed to a property node.

 

Unfortunately, the decorations cannot be given a unique identifier, such as a label. So if you have multiple decorations, it can be tricky to modify the properties of a specific one. If you are only dealing with one shape, this won't be an issue. One roundabout way to pick out a particular decoration would be to search through the array references until you find the one with matching size and location on the front panel. Alternatively, you could use a disabled control, such as a boolean push button with no caption, and refer to that directly.

 

Hope this helps.

-Garrett

0 Kudos
Message 2 of 2
(2,196 Views)