Is there any methods to output not whole model but a piece of it in the report?
Thanks.
Hi Konstantin,
try this code and change parameters in output.OutGraphicAbsolute method.
var g_nLoc = Context.getSelectedLanguage(); var oModel = ArisData.getSelectedModels()[0]; var pict = oModel.Graphic(false, false, g_nLoc); var sPath = "C:\\Program Files\\ARIS71\\server\\templates\\scriptservice\\internal\\"; var bRet = pict.Save(sPath + oModel.Name(g_nLoc) + ".jpg"); if (bRet){ var output = Context.createOutputObject( Constants.OUTPDF, "report.pdf"); var imageData = Context.getFile(oModel.Name(g_nLoc) + ".jpg", Constants.LOCATION_INTERNAL) if (imageData.length > 0){ var image = Context.createPicture(imageData, Constants.IMAGE_FORMAT_JPG); output.OutGraphicAbsolute(image, -100, 0, 200, 100, false);// write scaled image (20cm x 10cm) to the output object output.WriteReport(); } }