Archi Forum

Archi Plug-ins => jArchi => Topic started by: rheward on May 26, 2023, 12:55:52 PM

Title: Help with .createImage filepath
Post by: rheward on May 26, 2023, 12:55:52 PM
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.
Title: Re: Help with .createImage filepath
Post by: Phil Beauvoir on May 26, 2023, 13:01:25 PM
Hi,

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

Regards,

Phil
Title: Re: Help with .createImage filepath
Post by: rheward on May 26, 2023, 14:19:28 PM
That did it, thanks. Is that a dev's black art or something we should all know?  ;D  Should we edit the wiki?
Title: Re: Help with .createImage filepath
Post by: Phil Beauvoir on May 26, 2023, 14:26:59 PM
>  Should we edit the wiki?

Already done.  8)