cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Change state definition based on value in numeric entry or other value widget

AS_9770512
6-Contributor

Change state definition based on value in numeric entry or other value widget

Hi,

i have a state definition value for the value from a value display widget. Now i want to overwrite this state definition value (e.g. <30) and give a another value (e.g <20) which is defined by the user itself. 

 

I cannot change the state value property of the value widget even when i bind another value from a service to its source.It is not updating it. How can i achieve that? 

 

In this example it should take the color yellow instead of red because the thresholds are set as shown in the led widgets. The Statedefinition Values from the Value widget are binded to the same service as the led widgets. 

AS_9770512_0-1615994026942.png

 

1 REPLY 1

Hello,

I think that you can achieve that by modifying the StateDefinition entity through a service at runtime.

Resources["EntityServices"].UpdateStyleDefinition({
	name: undefined /* STYLEDEFINITIONNAME */,
	content: undefined /* JSON */
});

 Cyril

Announcements


Top Tags