Skip to main content
1-Visitor
January 12, 2017
Solved

How to add/change pictures on a model in TW Studio?

  • January 12, 2017
  • 3 replies
  • 4642 views

Hi,

We are now using ThingWorx studio to modify a panel model, and we want to add/change pictures on the panel surface.

We can add the picture to panel surface in Creo 2, but it can not be display in ThingWorx Studio. So our question is how can we add/change picture on a model in ThingWorx studio? Do we need install other TW tools for the action?

Thanks.

Best answer by mvonhasselbach

You can use the 3D Image widget, place it on the panel surface and size it so that it fits the screen. If you want to change the image interactively e.g. with a button click, you have two options:

  1. you can add a second 3D image widget at the same place and toggle the visibility with the button. I'd use a ToggleButton for it (it has true/false values) and a binding filter (return !value;) if you have just two images.
  2. you can use javascript to change the src value of the 3D image and this way toggle the shown images. I'd recommend this approach if you have more than 2 images because you'll need javascript in this case anyways.

Cheers, moritz

3 replies

10-Marble
January 12, 2017

Hi I don't think we can export creo models with texture and decal image to a pvz file

Regards

Taju Joseph

汐xie1-VisitorAuthor
1-Visitor
January 12, 2017

, How can I achieve the function... That is what we want to add in current model....Is there a tool to do this?

12-Amethyst
January 16, 2017

You can use the 3D Image widget, place it on the panel surface and size it so that it fits the screen. If you want to change the image interactively e.g. with a button click, you have two options:

  1. you can add a second 3D image widget at the same place and toggle the visibility with the button. I'd use a ToggleButton for it (it has true/false values) and a binding filter (return !value;) if you have just two images.
  2. you can use javascript to change the src value of the 3D image and this way toggle the shown images. I'd recommend this approach if you have more than 2 images because you'll need javascript in this case anyways.

Cheers, moritz

汐xie1-VisitorAuthor
1-Visitor
January 17, 2017

Hi,Moritz

Thanks for your reply.

Actually, I have ever tried your ways by using JS, but it only applys to a plane and it cannot cover perfectly or move with the model.

So,I think I have to temporarily give up.

Cheers.

12-Amethyst
April 9, 2019

there are ways to override textures down to the surface level using lower level javascript APIs, right down to being able to apply surface diffuse and composite decal textures etc.  the platform supports this, but its not exposed at a level that users can easily access (it is aimed at platform/widget developers)

 

so you don't have to give up as such, but you should probably start by explaining why this capability is needed - from there we can help you understand how to achieve what you want to achieve.

1-Visitor
April 9, 2019

How to change resource of 3d gauge randomly using script ? i.e change different color svg file by loading them to resource.
I am very new to javascript
Any help is much appreciated