Instrumented Assemblies > Using Sensors > To Connect a Sensor to a ThingWorx Server
  
To Connect a Sensor to a ThingWorx Server
To connect your model to the ThingWorx server, you must have a model in ThingWorx that corresponds to a model in Creo Parametric.
Follow the steps below:
1. ConfigureCreo Parametric for ThingWorx.
2. ConfigureThingWorx.
3. Publish Sensor information to ThingWorx.
4. Connect to the ThingWorx server.
Configuring Creo Parametric for ThingWorx
1. Set the configuration option thingworx_connector_config_file to the exact path of your ThingWorxconfiguration properties file (config.properties).
2. Confirm that you installed the JRE when you installed Creo Parametric or set the jlink_java_command configuration options as required.
Settings for the ThingWorx Server
Before you begin, note the following:
ThingWorx Server changed the way it authenticates using AppKey in URL. https://community.thingworx.com/community/developers/blog/2017/06/08/new-technical-changes-in-thingworx-800.
By default, new installations of ThingWorx 8.0.0 have the Allow Application Key as URL Parameter option disabled.
The Allow Application Key as URL Parameter option can be enabled or disabled on the ThingWorx PlatformSubsystem’s configuration page. To access the configuration page, click System > Subsystem > PlatformSubsystem > Configuration.
Configuring ThingWorx
Creo Product Insight 5.0.3.0 connects to ThingWorx 8.3.2. ThingWorx, ThingWorx Analytics, and Creo Product Insight for ThingWorx Extension need to be the same version. See the Imported Packages compatibility matrix here. The procedure below assumes that you have ThingWorx installed.
1. From the PTC Software Download page, download the ThingWorx Analytics extension.
2. Import the ThingWorx Analytics extension into ThingWorx.
3. Download Creo Product Insight for ThingWorx Extension from the PTC Marketplace:
a. Click Browse Content
b. In the Search box, type Creo Product Insight for ThingWorx
c. Click the version of the extension you need and click Download Now.
To download the Creo Product Insight for ThingWorx Extension User Guide, click Download documentation at the top right of the page.
4. In ThingWorx Composer, click Import/Export and then click Import. The Import dialog box opens.
5. Select Extension from the Import Option list.
6. Click Choose File. The Open dialog box opens.
7. Browse to the location of the Creo Product Insight for ThingWorx Extension. Select the zip file and click Open.
8. Click Import. When the Import Extensions dialog box displays the validation results and the installation results with a green check mark, installation is complete.
9. Click Close.
10. Refresh the Composer when prompted. In the refreshed composer, you should now see PTC.Creo.HelperThing, PTC.Analysis.CreoConnector, TW.Creo.Thing.ReplayHelper, TW.Creo.Mashup.ReplayEventPickeer, PTC.Creo.ReplayManager, and PTC.Creo.
11. To verify the installation of the extension, click Import/Export > Manage. The Installed Extension Packages page opens. Look for CreoProductInsightThingworx extension.
12. Select Creo Product Insight for ThingWorx Extension. Details of what is installed with the extension appears in the Package Details table below the list of installed extensions.
13. Perform Post Installation Configuration for Analytics Manager following instructions in the ThingWorx Analytics Help Center.
14. Access ThingWorx Analytics Manager by opening TW.Analytics.ConsoleMainMashup. In the ThingWorx Analytics Help Center, follow the steps in Set a Home Mashup.
In ThingWorx Composer, make sure All is selected, type or paste TW.Analytics.ConsoleMainMashup in the search box and press ENTER. View the mashup. A ThingWorx Analytics tab opens in your browser.
15. Click this tab and click Analytics Manager. ThingWorx Analytics Manager opens.
16. To configure a provider, click New. The New Analysis Provider page opens.
17. Type the name set by the AnalysisProvider property in your config.properties file in the Provider Name box.
18. Select PTC.Analysis.CreoConnector from the Connector list.
19. Click Save.
Publishing Sensor Information to ThingWorx
1. In your design in Creo Parametric, click Sensor Info and Setup or Tools > Sensor Info and Setup. The Sensor Info and Setup dialog box opens.
2. Select the Include check box to include the sensors to publish to ThingWorx.
3. Click File > Publish Sensors and then OK in the confirmation dialog box.
 
* A publishing operation can take some time.
4. In the Analytics Manager, create an Analysis Event using the model created.
5. Map the input parameters in the Analysis Event.
Connecting to the ThingWorx Server
1. Click Model > Connect to Server in an Instrumented Assembly, or Tools > Connect to Server. The Enter Credentials dialog box opens.
2. Enter your credentials and click OK. The ThingWorxSelect Replay Data from ThingWorx Server page opens.
3. To change the default source of replay data, select a source from the Data Source list.
4. Select start and end dates and time from the Replay Duration boxes. Click Done.
5. To send the data to Creo Parametric, click Send to Creo. In the message area, appears. When the data transfer completes, a appears in the message area and a Notifications message appears.
6. Load the sensor data.