Visible Property of TeeChart 8 in Wonderware InTouch 10.0

TeeChart for ActiveX, COM and ASP
buck2825
Newbie
Newbie
Posts: 9
Joined: Fri Jun 06, 2008 12:00 am

Visible Property of TeeChart 8 in Wonderware InTouch 10.0

Post by buck2825 » Thu Sep 11, 2008 5:26 pm

I'm using a bit of script to make a chart be visible at times and not visible at other times. The script works fine most of the time. when the screen is first loaded the graph is not visible dispite setting the visible property to true. In the lines of code just before setting the object visible among other things I set 36 data points on the same graph to a number (to draw a staight line) then set the graph visible "#ChartBottomRight.Visible = 1;" all the other code assoiated with this graph works, this is visible if i hard set the visible propertie (check the box in properties) but that also makes it so that you can not hide the graph. What gives. my customer is not happy and I have told them I would look into it further.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Sep 15, 2008 11:05 am

Hi buck2825,

Sorry but your message is a little bit confusing. Could you please confirm that you are using TeeChart, the version you are using and which kind of application are you having problems with?

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

buck2825
Newbie
Newbie
Posts: 9
Joined: Fri Jun 06, 2008 12:00 am

Post by buck2825 » Thu Sep 18, 2008 3:05 pm

I am usinging the latest TeeChart Pro 8.0.0.4 inside of wonderware Intouch 10.0 with HotFix SP3. The script I have is called on the show event of the screen and on a 120 sec time intervale to refresh the data. the line

#ChartBottomRight.Visible = 1;

is never exicuted on the show event but is on the refresh.

any thoughts?



**********************************************

DIM SQL_QUERY_NORTH AS MESSAGE;
DIM SQL_QUERY_SOUTH AS MESSAGE;


DIM strBR_Title AS MESSAGE;
DIM blLabels AS DISCRETE;
DIM intI AS INTEGER;


DIM intAimBR AS REAL;
DIM intScaleBR_Min AS REAL;
DIM intScaleBR_Max AS REAL;

intScaleBR_Min = 900;
intScaleBR_Max = 1800;
intAimBR = 1500;


strBR_Title = "Oxygen Consumed (scf/ton)";

blLabels = 0;

SQL_QUERY_NORTH = "DSN=WW; User ID=l3; Password=l3; SQL=Select * From EAF_BIG_DISPLAY WHERE (C_HT_ID LIKE '2%') ORDER BY Q_TAP_TIME";
SQL_QUERY_SOUTH = "DSN=WW; User ID=l3; Password=l3; SQL=Select * From EAF_BIG_DISPLAY WHERE (C_HT_ID LIKE '1%') ORDER BY Q_TAP_TIME";


#ChartBottomRight.Axis.Left.Title.Caption = strBR_Title;
%ChartObject4 = #ChartBottomRight.Series(2);
%ChartObject4.DataSource = SQL_QUERY_NORTH;
%ChartObject4.YValues.ValueSource = "F_O2_SCF";
%ChartObject4.LabelsSource="C_CREW";
%ChartObject4.Color = 65535;
%ChartObject4.Marks.Visible = blLabels;
%ChartObject4.Pen.Visible = 1;
%ChartObject4.asLine.Pointer.Visible = 1;
%ChartObject4.asLine.Pointer.Style = 1;
%ChartObject4.CheckDataSource();

%ChartObject4a = #ChartBottomRight.Series(1);
%ChartObject4a.DataSource = SQL_QUERY_SOUTH;
%ChartObject4a.YValues.ValueSource = "F_O2_SCF";
%ChartObject4a.Color = 12632256;
%ChartObject4a.Marks.Visible = blLabels;
%ChartObject4a.Pen.Visible = 1;
%ChartObject4a.asLine.Pointer.Visible = 0;
%ChartObject4a.asLine.Pointer.Style = 1;
%ChartObject4a.CheckDataSource();

#ChartBottomRight.Axis.Left.Automatic = 0;
#ChartBottomRight.Axis.Left.Minimum = -100000;
#ChartBottomRight.Axis.Left.Maximum = 100000;
#ChartBottomRight.Axis.Left.Minimum = intScaleBR_Min;
#ChartBottomRight.Axis.Left.Maximum = intScaleBR_Max;

%ChartObject4b = #ChartBottomRight.Series(0);
%ChartObject4b.Clear();
FOR intI = 1 TO 36
%ChartObject4b.Add(intAimBR,"", 12632256);
NEXT;

#ChartBottomRight.Visible = 1;

CurrentDisplay_Text = "MELT";

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Sep 22, 2008 8:56 am

Hello,

it's strange, where are you setting the chart visible to false ( before the on show event ) ?
Does it works fine by leaving it always as visible ? (for the first time window is oppened)
Could you please try to add the following line before to set visible = 1 ? :

ChartBottomRight.Environment.InternalRepaint

buck2825
Newbie
Newbie
Posts: 9
Joined: Fri Jun 06, 2008 12:00 am

Post by buck2825 » Mon Sep 22, 2008 1:03 pm

it's strange, where are you setting the chart visible to false ( before the on show event ) ?
****if you right click on the graph then go to properties there is a check box for visible. when this is clicked it locks the object to visible (unable to change the visible property), this works fine. when unchecked it allows the user to change the visible property of the object. *****

Does it works fine by leaving it always as visible ? (for the first time window is oppened)

****Yes, on my display i have four graphs, ChartTopLeft, ChartTopRight...ChartBottomRight. all other graphs display all the time it is just the one that I would like to toggle between visible and not visible. ****

Could you please try to add the following line before to set visible = 1 ? :
ChartBottomRight.Environment.InternalRepaint

****This line had no effect on the proformance of the script, it was as if it where never added. InTouch syntax is as follows

#ChartBottomRight.Environment.InternalRepaint();

this did not work before or after the line where I set visible = 1****
Last edited by buck2825 on Mon Sep 22, 2008 1:23 pm, edited 3 times in total.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Sep 22, 2008 1:07 pm

Hi buck2825,

The image you posted is not visible. Could you please check it?

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

buck2825
Newbie
Newbie
Posts: 9
Joined: Fri Jun 06, 2008 12:00 am

bump

Post by buck2825 » Wed Sep 24, 2008 4:28 pm

read last post

buck2825
Newbie
Newbie
Posts: 9
Joined: Fri Jun 06, 2008 12:00 am

Still having problems

Post by buck2825 » Mon Sep 29, 2008 2:38 pm

can someone please look into my issue

Marc
Site Admin
Site Admin
Posts: 1260
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Post by Marc » Mon Oct 06, 2008 12:05 pm

Hello,

As of yet, we've been unable to source a version of Wonderware with which to test the issue you report. If you know of the whereabouts of an evaluation version we can download to test the Chart behaviour please let us know.

Is it possible that the environment requires to do a refresh after changing a control's visibility?

In other respects we see no unusual behaviour with the TChart.Visible property when tested in different development environments, we recommend you contact the Wonderware support for their advice.

Regards,
Marc Meumann
Steema Support

buck2825
Newbie
Newbie
Posts: 9
Joined: Fri Jun 06, 2008 12:00 am

Post by buck2825 » Mon Oct 06, 2008 2:42 pm

lets make things a little easier to understand.

new application
wonderware intouch 10.0 sp 3
TeeChart Pro Active X 8

one form
one graph
one button
two lables

on load

i set run the following

**********************************
box1 = "test before";
#TChart1.visible =1;
box2 = "test after";
**********************************
results: in the lable "box1" the text reads "test before"
in the lable "box2" the text reads "test after"
the graph is not visible

on the click event of the button I call the script below

***********************************
IF #TChart1.visible == 0 THEN
#TChart1.visible = 1;
ELSE
#TChart1.visible = 0;
ENDIF;
************************************

results: when I click the button the graph becomes visible and invisible as you would expect.

my customer is becoming impatient.

buck2825
Newbie
Newbie
Posts: 9
Joined: Fri Jun 06, 2008 12:00 am

Post by buck2825 » Mon Oct 06, 2008 3:11 pm

while talking with wonderware

800-WONDER1 (800-966-3371) in the U.S. & Canada
(7 a.m. to 5 p.m. Pacific Time)
949-639-8500 outside the U.S.

they stated the you will have to talk to them directly about a demo licence.

wonderware had me place one of there active X controls on my test form

on the show event with the code below

***********************************
box1 = "test before";
#tchart1.visible =1;
#chart2.visible=1;
box2 = "test after";
***********************************

there control worked and yours did not

then on the click event of the button on my test form

code
**************************************
IF #TChart1.visible == 0 THEN
#tchart1.visible = 1;
#chart2.visible =1;
ELSE
#tchart1.visible = 0;
#chart2.visible = 0;
ENDIF;
*************************************
both controls worked fine

Marc
Site Admin
Site Admin
Posts: 1260
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Post by Marc » Mon Oct 06, 2008 3:20 pm

Hello,

I've just seen your new update. We'll contact Wonderware for a demo version.

Regards,
Marc
Steema Support

Marc
Site Admin
Site Admin
Posts: 1260
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Post by Marc » Mon Oct 06, 2008 4:06 pm

Hello,

With your last latest description we've been able to reproduce the problem in an onload event in VB. The problem relates to how the 'Visible' keyword itself is handled within the COM control. We've added a fix for the next maintenance release. We're looking for a workaround that can give you a solution in the interim.

Regards,
Marc
Steema Support

buck2825
Newbie
Newbie
Posts: 9
Joined: Fri Jun 06, 2008 12:00 am

Post by buck2825 » Mon Oct 06, 2008 5:55 pm

thank you kindly. please let me know as soon as you have an intrum fix. also when is the next maintenance release scheduled.

Marc
Site Admin
Site Admin
Posts: 1260
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Post by Marc » Tue Oct 07, 2008 9:08 am

Hello,

This is a workaround we've checked in VB, I can't confirm yet that it will function correctly in Wonderware. We'll check it in Wonderware too when we have the version ready to test.

If Chart is set as non-visible at design time and requires to be visible when run:

Code: Select all

Private Sub Form_Load()
 Firstload = False
 TChart1.Environment.InternalRepaint
End Sub

Private Sub TChart1_OnAfterDraw()
  If Firstload = False Then
    Firstload = True
    TChart1.Visible = True
  End If
End Sub
If Chart is set as visible at design time and requires to be non-visible when run:

Code: Select all

Private Sub Form_Load()
 Firstload = False
End Sub

Private Sub TChart1_OnAfterDraw()
  If Firstload = False Then
    Firstload = True
    TChart1.Visible = False
  End If
End Sub
The technique assumes that you have access in Wonderware to the TeeChart event OnAfterDraw. It uses the global variable Firstload to enter only once in the loop after the Chart is painted to set Visible to True or False.

I don't have a date yet for the maintenance release but it may be available within two-three weeks. That could be accelerated if necessary.

Regards,
Marc
Steema Support

Post Reply