Hi all. I am trying to connect the sum alerts to a shape on my GisViewer_ewo1 using the code in the html help:
main()
{
dyn_string strDefinition;
dyn_string color;
// We can tell the GIS viewer what _SumAlertPanel data points it needs to
// 'process'
// This example will just send the names of all data points
// to the viewer
dyn_string strTest = dpNames( "*", "_SumAlertPanel" ) ;
GisViewer_ewo1.PVSSSetSumAlertPanels( (string)strTest );
// We can now make a 'mapping' that associates a shape
// with a certain _SumAlertPanel data point
strDefinition = makeDynString( "COUNTRY@NAME@Austria@System1:Panel1_1" );
// ^^ Layer
// ^^ Field
// ^^ Value of field
// ^^ Name of _SumAlertPanel data point
GisViewer_ewo1.PVSSLinkSumAlertToShape( strDefinition );
// We now establish a query that will send the alert colors
// of the _SumAlertPanel data points to the GisViewer
string strQuery = "SELECT '.Warning:_alert_hdl.._act_state_color', '.Alert:_alert_hdl.._act_state_color', '.Danger:_alert_hdl.._act_state_color' FROM '*' WHERE ( _DPT = \\"_SumAlertPanel\\")";
dpQueryConnectSingle( "CallBackSumAlertPanel", "MyId", strQuery );
}
void CallBackSumAlertPanel( string strID, dyn_dyn_anytype a )
{
string strLine;
string strOneLine;
// We turn the dyn_dyn_anytype that we receive into something more useful
// so that our GIS viewer can handle it
for( int t = 2; t 2 )
strLine += "|";
// Our GIS viewer receives a list where each line looks as follows:
// ,,,
strOneLine = a[t][1] + "," + a[t][2] + "," + a[t][3] + "," + a[t][4];
strLine += strOneLine;
}
// Send the (formatted) dp's and colors to our GIS Viewer
GisViewer_ewo1.PVSSReceiveSumAlertStatus( strLine );
DebugN("status of the sum alert panel data points:",strLine);
}
On the debug I get the right panels but my shape does not flash.
I use this scrip on the initialize of the ewo. I changed the highlighted script with my panels/shapes.
I made sure the sum alert panel dp working.
Has anyone used this before?
Many thanks
GisViewer Sum Alert
- fmulder
- Posts:330
- Joined: Wed Feb 03, 2010 9:46 am
Re: GisViewer Sum Alert
You also need to load the ColorDb into the GisViewer so that it understands the colors that 'sit' in the SumAlerts.
Did you load the right ColorDB 's ?
Did you load the right ColorDB 's ?
- P3tran
- Posts:6
- Joined: Mon Jul 27, 2015 1:22 pm
Re: GisViewer Sum Alert
Many thanks Frenk. I used the following script on initialize.
main()
{
string strColorFile = getPath(COLORDB_REL_PATH, "colorDB");
GisViewer_ewo1.loadColorFile(strColorFile);
}
I managed to get the red color on the shape but it is not flashing as per UnAlert
Also on the log viewer I get the following:
WCCOAui4:referred color not found:_3DFace
Many thanks again
main()
{
string strColorFile = getPath(COLORDB_REL_PATH, "colorDB");
GisViewer_ewo1.loadColorFile(strColorFile);
}
I managed to get the red color on the shape but it is not flashing as per UnAlert
Also on the log viewer I get the following:
WCCOAui4:referred color not found:_3DFace
Many thanks again
- fmulder
- Posts:330
- Joined: Wed Feb 03, 2010 9:46 am
Re: GisViewer Sum Alert
The gis viewer will only display a flashing color when the color is a simple string.
"advanceAlarmCamUna" N
Please make sure that your color is 'simple' (and does not contain the name of a color)
This one should work !
"advanceAlarmCamUna" N
The script viewer can only parse a color that looks like
"advanceAlarmCamUna" N
Please make sure that your color is 'simple' (and does not contain the name of a color)
This one should work !
"advanceAlarmCamUna" N
The script viewer can only parse a color that looks like
- P3tran
- Posts:6
- Joined: Mon Jul 27, 2015 1:22 pm
Re: GisViewer Sum Alert
I have narrowed it down that the following script does not load all the available libraries:
TOPIC: GisViewer Sum Alert
Forum Tools
#3311
GisViewer Sum Alert 1 Day, 22 Hours ago
Hi all. I am trying to connect the sum alerts to a shape on my GisViewer_ewo1 using the code in the html help:
main()
{
dyn_string strDefinition;
dyn_string color;
// We can tell the GIS viewer what _SumAlertPanel data points it needs to
// 'process'
// This example will just send the names of all data points
// to the viewer
dyn_string strTest = dpNames( "*", "_SumAlertPanel" ) ;
GisViewer_ewo1.PVSSSetSumAlertPanels( (string)strTest );
// We can now make a 'mapping' that associates a shape
// with a certain _SumAlertPanel data point
strDefinition = makeDynString( "COUNTRY@NAME@Austria@System1:Panel1_1" );
// ^^ Layer
// ^^ Field
// ^^ Value of field
// ^^ Name of _SumAlertPanel data point
GisViewer_ewo1.PVSSLinkSumAlertToShape( strDefinition );
// We now establish a query that will send the alert colors
// of the _SumAlertPanel data points to the GisViewer
string strQuery = "SELECT '.Warning:_alert_hdl.._act_state_color', '.Alert:_alert_hdl.._act_state_color', '.Danger:_alert_hdl.._act_state_color' FROM '*' WHERE ( _DPT = \\"_SumAlertPanel\\")";
dpQueryConnectSingle( "CallBackSumAlertPanel", "MyId", strQuery );
}
void CallBackSumAlertPanel( string strID, dyn_dyn_anytype a )
{
string strLine;
string strOneLine;
// We turn the dyn_dyn_anytype that we receive into something more useful
// so that our GIS viewer can handle it
for( int t = 2; t 2 )
strLine += "|";
// Our GIS viewer receives a list where each line looks as follows:
// ,,,
strOneLine = a[t][1] + "," + a[t][2] + "," + a[t][3] + "," + a[t][4];
strLine += strOneLine;
}
// Send the (formatted) dp's and colors to our GIS Viewer
GisViewer_ewo1.PVSSReceiveSumAlertStatus( strLine );
DebugN("status of the sum alert panel data points:",strLine);
}
On the debug I get the right panels but my shape does not flash.
I use this scrip on the initialize of the ewo. I changed the highlighted script with my panels/shapes.
I made sure the sum alert panel dp working.
Has anyone used this before?
Many thanks
Petros Tsekouras
Fresh Boarder
Posts: 4
User Online Now Click here to see the profile of this user
Last Edit: 2016/03/02 16:53 By P3tran.
Quick Reply Reply Quote Edit
#3313
Re: GisViewer Sum Alert 1 Day, 2 Hours ago
You also need to load the ColorDb into the GisViewer so that it understands the colors that 'sit' in the SumAlerts.
Did you load the right ColorDB 's ?
Frenk Mulder
Expert Boarder
Posts: 119
User Online Now Click here to see the profile of this user
Quick Reply Reply Quote
#3321
Re: GisViewer Sum Alert 4 Minutes ago
Many thanks Frenk. I used the following script on initialize.
main()
{
string strColorFile = getPath(COLORDB_REL_PATH, "colorDB");
GisViewer_ewo1.loadColorFile(strColorFile);
}
That is why it cant see the color _3DFace when it is referenced. Because when I remove that from the initialise it does not give me the following error. Do I need to load all the colorDBs.?How do I do that?
I use the string format you suggested, because my shape changes colors when I load the colorDB.
Thanks for your reply
TOPIC: GisViewer Sum Alert
Forum Tools
#3311
GisViewer Sum Alert 1 Day, 22 Hours ago
Hi all. I am trying to connect the sum alerts to a shape on my GisViewer_ewo1 using the code in the html help:
main()
{
dyn_string strDefinition;
dyn_string color;
// We can tell the GIS viewer what _SumAlertPanel data points it needs to
// 'process'
// This example will just send the names of all data points
// to the viewer
dyn_string strTest = dpNames( "*", "_SumAlertPanel" ) ;
GisViewer_ewo1.PVSSSetSumAlertPanels( (string)strTest );
// We can now make a 'mapping' that associates a shape
// with a certain _SumAlertPanel data point
strDefinition = makeDynString( "COUNTRY@NAME@Austria@System1:Panel1_1" );
// ^^ Layer
// ^^ Field
// ^^ Value of field
// ^^ Name of _SumAlertPanel data point
GisViewer_ewo1.PVSSLinkSumAlertToShape( strDefinition );
// We now establish a query that will send the alert colors
// of the _SumAlertPanel data points to the GisViewer
string strQuery = "SELECT '.Warning:_alert_hdl.._act_state_color', '.Alert:_alert_hdl.._act_state_color', '.Danger:_alert_hdl.._act_state_color' FROM '*' WHERE ( _DPT = \\"_SumAlertPanel\\")";
dpQueryConnectSingle( "CallBackSumAlertPanel", "MyId", strQuery );
}
void CallBackSumAlertPanel( string strID, dyn_dyn_anytype a )
{
string strLine;
string strOneLine;
// We turn the dyn_dyn_anytype that we receive into something more useful
// so that our GIS viewer can handle it
for( int t = 2; t 2 )
strLine += "|";
// Our GIS viewer receives a list where each line looks as follows:
// ,,,
strOneLine = a[t][1] + "," + a[t][2] + "," + a[t][3] + "," + a[t][4];
strLine += strOneLine;
}
// Send the (formatted) dp's and colors to our GIS Viewer
GisViewer_ewo1.PVSSReceiveSumAlertStatus( strLine );
DebugN("status of the sum alert panel data points:",strLine);
}
On the debug I get the right panels but my shape does not flash.
I use this scrip on the initialize of the ewo. I changed the highlighted script with my panels/shapes.
I made sure the sum alert panel dp working.
Has anyone used this before?
Many thanks
Petros Tsekouras
Fresh Boarder
Posts: 4
User Online Now Click here to see the profile of this user
Last Edit: 2016/03/02 16:53 By P3tran.
Quick Reply Reply Quote Edit
#3313
Re: GisViewer Sum Alert 1 Day, 2 Hours ago
You also need to load the ColorDb into the GisViewer so that it understands the colors that 'sit' in the SumAlerts.
Did you load the right ColorDB 's ?
Frenk Mulder
Expert Boarder
Posts: 119
User Online Now Click here to see the profile of this user
Quick Reply Reply Quote
#3321
Re: GisViewer Sum Alert 4 Minutes ago
Many thanks Frenk. I used the following script on initialize.
main()
{
string strColorFile = getPath(COLORDB_REL_PATH, "colorDB");
GisViewer_ewo1.loadColorFile(strColorFile);
}
That is why it cant see the color _3DFace when it is referenced. Because when I remove that from the initialise it does not give me the following error. Do I need to load all the colorDBs.?How do I do that?
I use the string format you suggested, because my shape changes colors when I load the colorDB.
Thanks for your reply
- fmulder
- Posts:330
- Joined: Wed Feb 03, 2010 9:46 am
Re: GisViewer Sum Alert
I'd suggest the following:
* make your own colorDB
* make alarm classes using your own colors
* Load your own colorDB and all colordb's that you want via : string strColorFile = getPath(COLORDB_REL_PATH, "colorDB");
if you're not sure what color your alarm is using then you cna also load all colorDB's (all files that you find in the \\colorDB folder of your project or the WinCc OA installation)
Good luck and have a nice weekend
Frenk
* make your own colorDB
* make alarm classes using your own colors
* Load your own colorDB and all colordb's that you want via : string strColorFile = getPath(COLORDB_REL_PATH, "colorDB");
if you're not sure what color your alarm is using then you cna also load all colorDB's (all files that you find in the \\colorDB folder of your project or the WinCc OA installation)
Good luck and have a nice weekend
Frenk
- P3tran
- Posts:6
- Joined: Mon Jul 27, 2015 1:22 pm
Re: GisViewer Sum Alert
It worked. I made my own colorDB and alertclass.
Many thanks
Have a nice weekend
Many thanks
Have a nice weekend
- fmulder
- Posts:330
- Joined: Wed Feb 03, 2010 9:46 am
Re: GisViewer Sum Alert
Ok. A pleasure to help.
Good luck !
Good luck !