dheerendra
dheerendra

Reputation: 41

Custom widget in thingworx

Could any body let me know how to create custom widget in thingworx. I don't have any idea how to create custom widget. Please help me.

I have to build drag drop custom widget and we can use that custom widget with other widget. e.g with tree widget,... etc.

Upvotes: 4

Views: 3494

Answers (1)

JsG
JsG

Reputation: 96

I would recommend reading the official Extension Package Development Guide:

However, the best way to start making a new widget is to take an existing widget that does something like you want, and modify it. Built in widgets exist at

TomcatRoot\webapps\Thingworx\Common\thingworx\widgets

Here's a very brief guide to getting started with that. If you were to want to copy Textbox:

  1. Open the metadata.xml and change the "TextBox" to "MyWidget".
  2. There are two sections in this file. The "ExtensionPackage" section holds metadata for the pacakge (version, vendor, etc.)
  3. The second section , "Widgets" defines the widget files. Change the name of all these files to use your name e.g. MyWidget.ide.js Don’t forget to change name in the “Widget” xml tag too.
  4. Rename all necessary folder and files, replacing "TextBox" with "MyWidget"
  5. Open the both .js files and change the definition in each to reflect "MyWidget"
  6. In the ide file, change the icon path "widgetIconUrl" and the "name" property.
  7. Select the "ui" folder and the metadata.xml file and package them both into a new zip file. This file should import into Thingworx.

I would suggest searching for or asking this question in the PTC IoT Community, which is much more active for Thingworx developers than StackExchange.

UPDATE: The latest documentation for ThingWorx 9 Extension Package Development Guide can be found here

Upvotes: 6

Related Questions