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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

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

汐xie
10-Marble

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

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.

ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

8 REPLIES 8

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

Regards

Taju Joseph

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

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

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.

SteveGhee
12-Amethyst
(To:汐xie)

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.

Hi Moritz,

I am currently trying to bring an image in 2d panel using image widget but finding difficulty to fit the image in the given area. Kindly let me know how we can size the image.

Thanks,

Avinash

Hi Avinash,

No sure to understand the context, but in a 2D panel you have two fields WITH & HEIGHT, do ot forget to indicate "px" for sizing

  Not Capture.JPG

Nithin
11-Garnet
(To:汐xie)

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 

Announcements

Top Tags