Skip to main content
1-Visitor
January 4, 2021
Solved

How to update style definition using script

  • January 4, 2021
  • 1 reply
  • 2087 views

Please share the snippet or logic, if any provided by PTC.

 

Also let me know how to use that snippet with any example.

 

The thingworx version is 8.3.

 

Thanks in advance,

Best answer by odukiya

Hello @ranjank 

 

Please find following community post to answer your query

https://community.ptc.com/t5/ThingWorx-Developers/Style-definition-using-scripts/td-p/606413

https://community.ptc.com/t5/ThingWorx-Developers/How-to-create-style-definition-through-services-in-thingworx/td-p/558

 

Let me know if this one is of any help

 

Thanks

Om Dukiya

 

1 reply

22-Sapphire I
January 4, 2021

What is your use case that you want to update it using script?

Would normal enable/disable states or state definitions work for your use case?

ranjank1-VisitorAuthor
1-Visitor
January 5, 2021

@PaiChung 

 

Actually I want to pass different components like background color, foreground color(color codes), Italic, Underline(boolean) etc from mashup as inputs and then update the styles assigned to state definition for various nodes of tree widget.

odukiya16-PearlAnswer
16-Pearl
January 5, 2021

Hello @ranjank 

 

Please find following community post to answer your query

https://community.ptc.com/t5/ThingWorx-Developers/Style-definition-using-scripts/td-p/606413

https://community.ptc.com/t5/ThingWorx-Developers/How-to-create-style-definition-through-services-in-thingworx/td-p/558

 

Let me know if this one is of any help

 

Thanks

Om Dukiya