Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Dear Team,
How can we use properties file in Thingworx?
Thanks
Bhuwaneshwar Gupta
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.
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