M.App Enterprise Discussions

Discuss topics with other M.App Enterprise Product pioneers and experts to get the most out of it.
Showing results for 
Search instead for 
Do you mean 
Reply
Frequent Contributor
Posts: 93
Registered: ‎10-10-2015
Accepted Solution

Analyzer API - Loading Live Data

Hi everyone, I saw some examples un community than load new vectorset data in Analyzer using API, something like this

 

 

var dataset = {mode: "EnterpriseConnector",vectorset: "Ductos4_VS", datasetName: "Ductos_c"};

var stage = await Analyzer.createStage("Ductos_c", dataset);
stage.dataPreview.FieldNames();
stage.dataPreview.FirstRow;
var theme = Analyzer.createThemeWidget(Analyzer.findStageModel("Ductos_c"), "servicio");
var feature = Analyzer.createFeatureLayer(stage);
feature.title = "Ductos_c";
feature.opacity = 80;
feature.options.lineStyle["width"] = 3;
Analyzer.addWidget(theme);
Analyzer.addWidget(feature);
Analyzer.reloadView(); 

 

This works ok. 

 

Now i want to load Live Data from M.App Enterprise, i know can use sqlquery, but for better performance I want to load with ME Live Data, is it posible? 

 

If yes, how can change the dataset instead this 

var dataset = {mode: "EnterpriseConnector",vectorset: "Ductos4_VS", datasetName: "Ductos_c"};

 

Thank you for advanced. 

 

 

Erik Salgado Estrada
STIAN, México.
Staff
Posts: 1,131
Registered: ‎10-18-2015

Re: Analyzer API - Loading Live Data

hi Erik,

 

since M.App Enterprise 2019 U3 you should be able to load live data simply using the configuration panel. Just switch from Vector Set to Live Data:

Screenshot 2020-09-29 104655.png

With this you also leverage the capability of applying a session filter to the Vector Data.

 

HTH,

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Frequent Contributor
Posts: 93
Registered: ‎10-10-2015

Re: Analyzer API - Loading Live Data

Thank you for your response. 

 

I mean, if I want to load aditional Live Data to Analyzer with the API, 

 

How can I do that? 

Erik Salgado Estrada
STIAN, México.
Staff
Posts: 1,131
Registered: ‎10-18-2015

Re: Analyzer API - Loading Live Data

you can simply change your dataset definition as:

 

var dataset = {mode: "EnterpriseConnector",dataConnectionMode: "liveData", datasetName: "NAMEOFLIVEDATA"};

Please consider that in the next release the possibility to manage multiple datasets will be available also in the configuration panel.

 

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Frequent Contributor
Posts: 93
Registered: ‎10-10-2015

Re: Analyzer API - Loading Live Data

Thankyou @sturcato it work.

 

Its good to know that in the next release this will be more easy.

 

Thank you again .

Erik Salgado Estrada
STIAN, México.