question

Allister Wilson avatar image
1 Like"
Allister Wilson asked Clair A commented

Reloading a single image file

I'd like to periodically reload a texture file every few seconds.

The only "solution" I've found so far is to create a new image each time and load that with loadimage, this is not a viable solution given the footprint just keeps growing.

Is there any way to unload a single media file (as opposed to all of them with mediareset), or force-load a file (ignoring the fact it has already been loaded)?

FlexSim 17.1.2
medialoadimage
5 |100000

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

1 Answer

Phil BoBo avatar image
1 Like"
Phil BoBo answered Clair A commented

The only way currently to remove a texture from the media list is to clear the list and reload all of the textures.

If you want to dynamically load and reload a texture, you'll need to use C++ to load the texture using OpenGL directly.

The media list doesn't currently have an accessible mechanism for unloading just one texture.

· 1
5 |100000

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

Clair A avatar image Clair A commented ·

Using the research bar, I landed on the above answer from 2017. A more recent answer from @Phil BoBo with a solution is available on that post:

https://answers.flexsim.com/questions/35343/show-state-pie-and-statistics-in-3d-model.html

1 Like 1 ·