Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

jcom.dll: no support VT_??? VARTYPE=200Ch.

2008-01-30
2013-04-17
  • Hello,

    I've already made a complete indesign com appliction in php, but now i'm translating the php to java to have more secure code.
    I've found this jcom and it works perfectly until i needed to have the x,y (left top) and x,y(right bottom) of an item on my indesign page.

    example code :

       IDispatch rectangles = (IDispatch)FoundTag.get("rectangles");
       IDispatch rectangle = (IDispatch)rectangles.method("Add", null);
       IDispatch Bound= (IDispatch)rectangle.get("GeometricBounds"); => This must return a kind of variant array [x1,y1,x2,y2]

    getting GeometricBounds will result into a crash jcom.dll: no support VT_??? VARTYPE=200Ch.!

    while in php this worked :

              $bounds = $Rectangle->GeometricBounds;
              $bounds[0] = ceil($bounds[0]);
              $bounds[1] =  ceil($bounds[1]);
              $bounds[2] = RoundToHundred($bounds[0] + $v2)."mm";
              $bounds[3] = RoundToHundred($bounds[1] + $v3)."mm";
              $Rectangle->GeometricBounds = $bounds;

    I hope you can give me a solution for this :)

    Thx in advance,

    David

     
    • nevermind i've found a work around for getting the bounds :

            Vector param = new Vector();
                              param.add(0);
                              double g0 = (Double)rectangle.get("GeometricBounds",param.toArray());
                              param = new Vector();
                              param.add(1);
                              double g1 = (Double)rectangle.get("GeometricBounds",param.toArray());
                              param = new Vector();
                              param.add(2);
                              double g2 = (Double)rectangle.get("GeometricBounds",param.toArray());
                              param = new Vector();
                              param.add(3);
                              double g3 = (Double)rectangle.get("GeometricBounds",param.toArray());                  
                              errpos = 11;

      But now i need to change for eg g3 and g2. How do i change those values ??

      i've tried

                              Object[] test = new Object[4];
                              test[0] = g0;
                              test[1] = g1;
                              test[2] = s3;
                              test[3] = s4;
                            
                              rectangle.put("GeometricBounds", test);
      but then i get index = 0 warning