cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

How To use Properties file

bgupta-2
10-Marble

How To use Properties file

Dear Team,

How can we use properties file  in Thingworx?

Thanks

Bhuwaneshwar Gupta

3 REPLIES 3
supandey
19-Tanzanite
(To:bgupta-2)

Hi Bhuwaneshwar, could you please elaborate on your use case and what sort of properties file are you referring to?

Hi Sushant,

During writting services I need to replace hardcode by properties.

Ex.  

if(varForlongLati.Name == "Battery Status")

            batteryStatus = varForlongLati.Value

Here Battery Status is hardcoded, so need to put in properties file.



supandey
19-Tanzanite
(To:bgupta-2)

I'm not sure where this property file for you exists, but one option could be to have a file in e.g. json format created and have that placed somewhere e.g. ThingWorxStorage folder and then load it's content using the FileReporsitory thing. There are some more services from FileSystem that you could use OOTB e.g. LoadJSON, LoadText, LoadXML, etc.

Hope this'd help

Announcements


Top Tags