cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Load Media Entity in a Service

pshashipreetham
17-Peridot

Load Media Entity in a Service

Hi, 

How can I load an Image from MediaEntities in the Service? 

Thanks,

Shashi Preetham,
Email: psp316r@outlook.com,
Mobile: +91 8099838001.
1 ACCEPTED SOLUTION

Accepted Solutions

So,

In the Service, I have written the following code:

result = "Thingworx/MediaEntities/ImageName"

And the output of the service should be ImageLink.

 

To display the image in the ValueDisplay, go to the ValueFormat widget property of ValueDisplay and press on the Renderer and State

Shashi_Preetham_0-1664207884620.png

and do the following configuration 

Shashi_Preetham_1-1664207913970.png

Thanks,

Shashi Preetham,
Email: psp316r@outlook.com,
Mobile: +91 8099838001.

View solution in original post

2 REPLIES 2

@pshashipreetham ,

 

The media entities have a GetImage() service that returns the image for you.  Hope that helps.

 

Nick

So,

In the Service, I have written the following code:

result = "Thingworx/MediaEntities/ImageName"

And the output of the service should be ImageLink.

 

To display the image in the ValueDisplay, go to the ValueFormat widget property of ValueDisplay and press on the Renderer and State

Shashi_Preetham_0-1664207884620.png

and do the following configuration 

Shashi_Preetham_1-1664207913970.png

Thanks,

Shashi Preetham,
Email: psp316r@outlook.com,
Mobile: +91 8099838001.
Top Tags