D
dani
Hi,
has anyone here used the DropMany method in Delphi before? I can try
whatever I want, the method does not fill my array of shape IDs...
I can successfully give the masters and the positions of the masters to
drop to Visio, and it is also drawing these shapes, and the return value
of DropMany is also correct.
But the third SafeArray (aShapeIDs) somehow stays untouched (in this
case, all 0's).
Does anyone have an idea what might be wrong here?
thanks for help
Daniel
here's my code:
var
aMasters, aPositions, aShapeIDs: PSafeArray;
ArrayBounds: TSafeArrayBound;
data: Pointer;
tmpArray: IntegerArray;
i: Integer;
...
begin
...
ArrayBounds.lLbound := 0;
ArrayBounds.cElements := <some integer>;
...
aShapeIDs := SafeArrayCreate( varInteger, 1, ArrayBounds );
...
SafeArrayAccessData(aShapeIDs,data);
i := activePage.DropMany(aMasters,aPositions,aShapeIDs);
tmpArray := IntegerArray(data);
for i := 0 to <some integer> do begin
objID := tmpArray;
...
end; //for i
SafeArrayUnAccessData(aShapeIDs);
has anyone here used the DropMany method in Delphi before? I can try
whatever I want, the method does not fill my array of shape IDs...
I can successfully give the masters and the positions of the masters to
drop to Visio, and it is also drawing these shapes, and the return value
of DropMany is also correct.
But the third SafeArray (aShapeIDs) somehow stays untouched (in this
case, all 0's).
Does anyone have an idea what might be wrong here?
thanks for help
Daniel
here's my code:
var
aMasters, aPositions, aShapeIDs: PSafeArray;
ArrayBounds: TSafeArrayBound;
data: Pointer;
tmpArray: IntegerArray;
i: Integer;
...
begin
...
ArrayBounds.lLbound := 0;
ArrayBounds.cElements := <some integer>;
...
aShapeIDs := SafeArrayCreate( varInteger, 1, ArrayBounds );
...
SafeArrayAccessData(aShapeIDs,data);
i := activePage.DropMany(aMasters,aPositions,aShapeIDs);
tmpArray := IntegerArray(data);
for i := 0 to <some integer> do begin
objID := tmpArray;
...
end; //for i
SafeArrayUnAccessData(aShapeIDs);