Home Forums General XMetaL Discussion Is there a way to programmatically reload a single image? Reply To: Is there a way to programmatically reload a single image?

Derek Read

Reply to: Is there a way to programmatically reload a single image?

Collapsing and expanding the element should do it, something like this works for me:

//XMetaL Script Language JScript:
//Select the image before running this script…
rng = ActiveDocument.Range;
rng.CollapsedContainerTags = true;
Application.Alert(“collapsed”);
rng.CollapsedContainerTags = false;

You could cycle through all images in the document to get them all to redraw.

There is also ActiveDocument.Reload() but that reloads the document from disc.

Note that this does not alter any associated attribute values. That would need to be dealt with separately if you want to change them.

Reply

Products
Downloads
Support