Help with .createImage filepath

Started by rheward, May 26, 2023, 12:55:52 PM

Previous topic - Next topic

rheward

I'm struggling to get createImage to work. In the example:

var image = model.createImage("cat.png");

where would the cat.png file be? Is there a default?

The help says it has to be a full file path and image name, but when I try something like "C:\Users\richard\cat.png" it still errors with Cannot find file.

Phil Beauvoir

#1
Hi,

on Windows, you need double back-slashes or forward slashes in the path.

Regards,

Phil
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

rheward

That did it, thanks. Is that a dev's black art or something we should all know?  ;D  Should we edit the wiki?

Phil Beauvoir

>  Should we edit the wiki?

Already done.  8)
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.