script for changing the limits of a trend

Find and share HowTos to various installations / configurations!
2 posts • Page 1 of 1
Ricardo Ali
Posts:2
Joined: Fri Sep 24, 2010 4:35 pm

script for changing the limits of a trend

Post by Ricardo Ali »

Greetings to all

I need to make an application where the limits of a trend change depending on the values ??entered by the operator in numeric fields depending on the production.

I received some help, and i have the following script but i do not know where use it.

main()
{
string max;
getValue("", "text", max);

shape tr=getShape("TREND1");

tr.curveAutoscale("#1_1")=FALSE; // switch off autoscale ot the y-scale

tr.curveMax("#1_1", max); // setup of min/max value
tr.curveMin("#1_1", 0);
}

i hope that you can understand me.

Best regards

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: script for changing the limits of a trend

Post by leoknipp »

Hello,

you could add a button (Event Clicked) to the trend-panel where you read the values entered by the user and apply them afterwards to the trend-widget.
Please notice that the widget-name "TREND1" and the curve-names have to fit your application and your settings.

Best Regards
Leopold Knipp
Senior Support Specialist

2 posts • Page 1 of 1