Hi,

My problem was in the dimensioning!

The old code line which did not work, was:
    Global Shape1(2999) As New com.sun.star.awt.Point   

    In order to use Shape1()  in two different subroutines.

A sketch of the new code line and arguments added to subroutines is:
    sub dshape()
    .
    .
        Dim Shape1(2999) As New com.sun.star.awt.Point
    .
    .
        readdata(Shape1)
    .
    .
        PolyPolygonShape.PolyPolygon = Array(Shape1())
    .
    .
    .
    sub readdata(Shape1 as variant)
    .
    .
    .
        shape1(ii-1).x = val(mid(CLine, 5, 15))
    .
    .
        shape1(ii-1).y = val(mid(CLine, 5, 15))       
    .
    .
    .
Thanks again! 

Paolo Mantovani wrote:
Hi Mike,

Alle 17:05, venerdì 26 agosto 2005, Mike Carmichael ha scritto:
  
While using a beta version of OpenOffice, on two different
systems(Millennium & 2000), a macro which draws a parabola generates the
following error consistently after the macro has been run once:

Basic Runtime error.
An exception occurred
Type com.sun.star.lang.IllegalArgumentException
Message: sequence element is not assignable by given value
    

It would be nice to see the code that raises the error...

  
If the macro is physically changed by adding a Rem statement, and then
rerun, it will work one time, and then repeat this error each time it is
run.
    

It obviusly depends from _where_ you put the Rem... :-)


  
Is there a method to clear the array which is used to create the shape?
    

In general you can do as follow:
	Redim MyVector() [As <type>]

(the part between square parenthesis is optional, <type> must be one of the 
data types supported by StarBasic, like String / Long etc.)

or even:
	MyVector() = Array()

I can't say nothing more specific because of the missing source code.


regards
Paolo M


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  

Reply via email to