Assembly Design > Instrumented Assemblies > Using Sensors > Minimum Requirements for the Configuration Properties File
Minimum Requirements for the Configuration Properties File
The config.properties file for ThingWorx must contain the following properties. What each property specifies is described in the following list:
URI—URL of the ThingWorx server where the Analytics Manager framework is running.
Userid—ID for the user who is establishing connection to the server.
Password—Password for the user who is establishing connection to the server.
AppKey—Key you created on the ThingWorx server. You can use this instead of a user ID and password.
CallTimeout—Time in milliseconds that a server call waits before failing with a time-out error. The value depends on the latency of the network. By default, this value is set to 5000. Make sure to set a high value to avoid timeout errors. Fetching replay data of a large duration may take some time.
AgentId—Unique string for identifying an agent to the ThingWorx server. When a value is not specified, a unique ID is generated automatically and reused until a different ID is provided.
AppImpClass—Fully qualified name of the class that implements the application interface.
When you are using Creo as a Service, the value for this property must be set to com.ptc.thingworxconnector.CreoAsServiceAdapter.
ConnectorName—Name of the connector instance that is created for interacting with an analysis provider and is used while configuring the analysis provider on the server side.
AnalysisProvider—Analysis provider created using the connector specified in the ConnectorName property described above.
AgentWorkDir—Directory used by the agent to store model files, temporary files, result files, and data files. By default, the AgentFiles folder is created in the current working directory.
ClientInstanceInitCount—Number of client instances that start when the agent is started. The default is 1.
ClientInstanceMaxCount—Maximum number of client instances that this agent can start. Specify a value greater than 0 to provide a fixed maximum value for the number of clients. The default value of -1 specifies that the agent can start an unlimited number of clients.
UseAppKeyInUrl—Include or do not include the appkey in the ThingWorx replay manager mashup url shown in the Creo Parametric embedded browser. Use this option for Thingworx 8.0 and later builds. When true, the appkey is included. The default value is false.
To use Creo as a service (CaaS), you need to set the properties above and these additional properties:
CreoWorkingDir—Location of the Creo Parametric process working directory. Copy the config.pro file to this directory so that all instances of Creo Parametric can use this config.pro file.
WindchillDefaultContext—Default Windchill context for Creo as a Service. This context should be available on the server and the user running Replay Analysis should have access to this context.
WindchillDefaultWorkspace—Default Windchill workspace for Creo as a Service. The workspace should be available on the server and the user running Replay Analysis should have access to this workspace.
CreoExecutablePath—Location of the script or executable to launch the Creo process. This is calculated automatically when running CreoAnalysisAgentFarmMachineConfiguration.bat.
For more information about required properties, search the ThingWorxAnalytics Help Center.
A sample config.properties file for an interactive session is available in the Creo Parametric installation directory Common Files folder. See the example that follows:
c\ProgramFiles\PTC\Creo 6.0.0.0\Common Files\text\java\config.properties
A sample config.properties file for using Creo as a Service is available in the Creo Parametric installation directory Common Files folder. See the example that follows:
c\ProgramFiles\PTC\Creo 6.0.0.0\Common Files\text\java\scripts\serviceconfig.properties
Enabling Logging
To enable logging, perform the following steps before starting a Creo Product Insight for ThingWorx Extension session:
1. Copy the sample logback.xml file from the Creo Parametric installation directory, to the directory that is specified by the configuration option thingworx_connector_config_file and that contains your config.properties file. For example, the location of logback.xml might be c\ProgramFiles\PTC\Creo 6.0.0.0\Common Files\text\java\scripts\logback.xml.
2. Update the sample logback.xml file with your setup environment information. For configuration information, such as logging levels and other details, refer to the online documentation for logback.xml at https://logback.qos.ch/manual/configuration.html.