Hallo together,
what I want is to insert a picture into a model within a report.
I can insert rounded rectangles, lines, texts ... into a model. I also can insert a picture manually into a model or insert a picture into an output document. That's all fine.
But I don't know how to insert a picture into a model with a report. That sounds simple but all I tried was not successful.
The picture is a *.png-file stored in ARIS in the common files group.
I would be very happy if anyone can help me.
Many thanks in advance.
Holger
Should work like this
var output = Context.createOutputObject(); var imageData = Context.getFile("mylogo.png", Constants.LOCATION_INTERNAL) var image = Context.createPicture(imageData, Constants.IMAGE_FORMAT_PNG); output.OutGraphic(image, -1, 70, 70);// write scaled image (7cm x 7cm) to the output object
Hallo Robert,
many thanks for your answer. What you wrote works fine. But this is to insert a picture into an output object and so into a document. Sorry, but that's not what I need.
I want to insert a picture into a model. Like this:
oRect = oModel.createRoundedRectangle(84, 39, 3430, 730);
This inserts a rounded rectangle. I need a similar function to insert a picture. I didn't found a function for this in the help pages.
BR Holger
Ahm yes sorry...
Try fidling with those:
Model.createComObjOcc ( int x, int y, int width, int height, ComObjOcc source, boolean bCreateNewDef )
Model.getGfxObjects ( ) I know, this is only for getting the Gfx objects, but perhaps there is also a hidden method to create one ? I think it was possible once...
BR Robert