3 Replies Latest reply on Nov 6, 2017 6:43 AM by supandey RSS
    bgupta Apprentice

    How To use Properties file

    Dear Team,

     

    How can we use properties file  in Thingworx?

     

     

    Thanks

    Bhuwaneshwar Gupta

      • Re: How To use Properties file
        supandey Collaborator

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

          • Re: How To use Properties file
            bgupta Apprentice

            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.


             


             

              • Re: How To use Properties file
                supandey Collaborator

                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