AnsweredAssumed Answered

PI UFL INI file possibly crashing when variable not present in file

Question asked by rmulla on Feb 15, 2017
Latest reply on Feb 15, 2017 by rmulla

I'm experiencing an issue when trying to import weather data using UFL.

 

For some reason the import seems to crash halfway through and not all of the points are created. I think this is because some of the input files don't have the values in the file while others do....

 

Is there a way to add an IF statement that checks to see if the variable is present in the file before running the StoreInPI command?

 

Attached are the XML files I'm trying to import and the INI file I manually created.

 

I have no experience with INI files so I don't know what is possible. Could I add something like this:

 

[WindDegrees]

IF "<wind_degrees" exists:     (want to add something like this)

     WindDegrees.FILTER=C1=="*<wind_degrees>*"

     WindDegrees=["*wind_degrees>(*)</wind_degrees*"]

     StoreInPI("NWS_"&Station&"_WindDegrees", ,Timestamp,WindDegrees, , )

Outcomes