Advanced Customization > Add 3D Visualization to Your Task
  
Add 3D Visualization to Your Task
Overview
With ThingView WebGL Extension, you can visualize 3D data from Windchill within a ThingWorx application. This extension is included with the Windchill Extension. When you use ThingView WebGL Extension, you can perform the following tasks:
Interact with 3D data. For example, you can zoom, pan, and rotate the graphics.
Trigger events with 3D parts are selected.
Change the transparency and color of 3D parts.
Change the background color of 3D graphics area.
The ThingView WebGL Extension contains these files:
An Extension bundle that is installed in the ThingWorx Composer.
Sample mashup files that demonstrate the use of ThingView WebGL Extension in ThingWorx. The sample mashup contains Templates, Things, Shapes and so on, that interact with the extension.
Using ThingView WebGL Extension
After you install ThingView WebGL Extension in ThingWorx, the extension is ready to use.
Use the extension along with the ThingView widgets to create mashups and applications that enable 3D data in ThingWorx. For examples of how to use this extension, see Create a New Task from Scratch for ThingWorx Navigate.
The ThingView WebGL extension has the following properties, events and services.
Widget properties:
ProductToView–A URL to the file to display. This can either point to a PVZ file located on the ThingWorx server or on another server, or to a visualization of a part inWindchill.
BackgroundStyle–A style definition controlling the background color of the widget. Only the background color property is used out of the style.
Data–Used to drive synced selection between the ThingView widget and other widgets in the mashup. The Data is an infotable containing a column on the occurrence identifier (BOM ID path).
DataFormatter–Rules for color in the widget. Only the foregroundColor value and transparency setting are used. Set the transparency very low to hide parts, for example. All other fields are ignored. This can be used to highlight parts that are in state RELEASED versus INWORK.
OccurrenceField–Field in the Data that contains the Occurrence path id. This is used to find rows for selection and coloring.
selectedOccurrencePath–The Occurrence path that is currently selected.
Events that the widget initiates:
Loaded—After the ProductToView finishes loading, the View property is set, and all other parsing is complete.
selectionChanged–After the selection in the widget changes.
Services that allow executing actions in the widget:
ZoomAll—Moves the camera to a position where the entire product is visible.
ZoomSelected—Moves the camera onto the selected parts.