‎30-05-2018 12:26 PM
Solved! Go to Solution.
‎05-06-2018 03:21 PM
For whom may be interested, I found a way to get the Jpeg diagram.
Java:
// get an Organizational Process
MegaObject op=oRoot.getObjectFromID("~JLDdvLAcOLwB[01_01_Financial Reporting regulation updating <EN> ]");
MegaObject diag=op.getCollection("~HIedE)fyADy0[Description]").filter("~KekPBSs3iS10[Diagram]").get(1);
if(diag.exists()) {
MegaDrawing md=MegaServiceBuilder.getDrawingOf(diag);
String fn="c:\\temp\\diag1.jpg";
// saveAsPicture(String FileName,int FilePictureFormat,int BitsPerPixel,int Quality,int Resolution,int Height,int Width)
md.saveAsPicture(fn, 2, 8, 100, 10, 16000, 16000); //megaFPFjpg=2
MegaCurrentEnvironment env = oRoot.currentEnvironment();
env.toolkit().executeCmd(fn, "?open");
}
VB Script:
root=getroot
op=root.getObjectFromID("~JLDdvLAcOLwB[01_01_Financial Reporting regulation updating <EN> ]")
diag=op.getCollection("~HIedE)fyADy0[Description]").gettype("~KekPBSs3iS10[Diagram]").item(1)
if diag.exists then
Set oDrawing = diag.Drawing("RO") 'Read-Only
fn="c:\temp\diag.jpg"
'saveAsPicture(FileName,int FilePictureFormat,int BitsPerPixel,int Quality,int Resolution,int Height,int Width)
oDrawing.saveAsPicture "c:\temp\diag.jpg", 2, 16, 1000, 1000, 15000, 15000
Set ws=CreateObject("WScript.Shell")
ws.run fn
end if