Good day everyone :)

Can i get a little help please?

I want to generate a doc file from a model and wanna show an image from an attribute which have an image url.

I have an object, which has a description attribute. 

This attribute contains an image url, which is :

My problem is, when i ran my code, it makes a system path from the url like this:


And the error message is : The filename, directory name, or volume label syntax is incorrect


I am running the following code below:


//----------------------------Read Image from Attribute----------------------------------
                //Path of the requested picture
                var path = oObjList[i1].ObjDef().Attribute(9, nloc).GetValue(false); --> get the correct url link
                //Java File to get the picture
                var fileMyFile = new; --> Convert to system path
                var reader = new;
                var fileByteArray = [];
                //Convert picture to ByteArray
                fileByteArray = java.nio.file.Files.readAllBytes(fileMyFile.toPath());
                //Create JavaScript Array
                var javaScriptArray = new Array();
                //Now push data from Java Array to JavaScript Array
                for (var i = 0; i < fileByteArray.length; i++){
                //Create Image from data
                var image = Context.createPicture(javaScriptArray, Constants.IMAGE_FORMAT_JPG);
                //----------------------------Read Image from Attribute----------------------------------

Thank you for helping me out :)

Tags: ARIS Report Scripting ARIS script 
Attachments:Image icon arishelpimage.png