question

Yue Y avatar image
0 Likes"
Yue Y asked Phil BoBo edited

Is it possible to show a picture in BasicFR?

Is it possible to fetch a picture from an external service and display it in the place of BasicFR?

FlexSim 19.1.0
visualization
· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jacob Gillespie avatar image Jacob Gillespie ♦ commented ·

You want to programmatically change the texture of the BasicFR?

1 Like 1 ·
Yue Y avatar image Yue Y Jacob Gillespie ♦ commented ·

Yes, exactly. Is it possible?

0 Likes 0 ·
Jeff Nordgren avatar image Jeff Nordgren commented ·
@Yue Y

On the fly (in real time), probably not. But if you downloaded it previously, we could get something to work. Are there an unlimited number of graphics that the picture can be?

Thanks.

0 Likes 0 ·

1 Answer

Phil BoBo avatar image
0 Likes"
Phil BoBo answered Phil BoBo edited

Yes.

Use loadimage() and setobjecttextureindex():

treenode basicFR = Model.find("BasicFR1");
int textureIndex = loadimage("D:\\Pictures\\2.png", "2.png");
setobjecttextureindex(basicFR, textureIndex);
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.