Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
other
informationbridge
office.intranets
office.misc
office.setup
office.xml
officeupdate
onenote
photodraw.discussion
powerpoint
producer
proj.standard&server
project
project.developer
project.pro_and_serve
project.server
project.vba
project2000
publisher
publisher.prepress
publisher.programming
publisher.webdesign
visio
visio.createshapes
visio.database.modeling
visio.dev.diagrams
visio.dev.shapesheet
visio.dev.vba
visio.dev.vc
visio.developer
visio.general
visio.installation
visio.printing
visio.software.modeling
visio.troubleshoot
  
 
date: Thu, 14 Jul 2005 13:29:09 -0700,    group: microsoft.public.visio.createshapes        back       


Dropmany error   
I'm trying to use Dropmany to drop a bunch of masters (from multiple 
stencils) onto a page.  From reading the documentation it looks like I have 
to create an array that holds a reference to each master object  (as opposed 
to an index or name) that I want to drop since I want to drop the masters 
onto a document that is not the stencil's document.  I cannot get the code to 
work though. I get error  "Method DropMany of object IVPage failed"

I can't figure out what is wrong... any ideas? Using visio 2000


    Dim stencil As Visio.Document
    Dim sCurState As String
    Dim theMaster As Visio.Master
    Dim allMasters() As Variant
    Dim xyArray() As Double
    Dim idArray() As Integer
    
    For lCounter = 1 To 49
        
        sCurState = sStateCodes(lCounter)
        Set stencil = vA.Documents.OpenEx("C:\MyFiles\Stencils\CO_" & 
sCurState & ".vss", visOpenDocked)
               
        'Create array holding indices to each master in the stencil
        ReDim allMasters(1 To stencil.Masters.Count)
        ReDim xyArray(1 To stencil.Masters.Count * 2)
        ReDim xyArray(1 To stencil.Masters.Count * 2)
        Dim i As Long
        For i = 1 To stencil.Masters.Count
                    
            allMasters(i) = stencil.Masters(i)
            xyArray(i * 2 - 1) = i
            xyArray(i * 2) = i
            
        Next i
        Dim lShapes As Integer
        lShapes = vD.Pages(1).DropMany(allMasters, xyArray, idArray)
        
        stencil.Close
    Next lCounter
date: Thu, 14 Jul 2005 13:29:09 -0700   author:   adb

Re: Dropmany error   
Where are you setting idArray?

-- 
Mark Nelson
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.

"adb"  wrote in message 
news:8B344E85-9FFF-4D08-8B80-D4935D7F5190@microsoft.com...
> I'm trying to use Dropmany to drop a bunch of masters (from multiple
> stencils) onto a page.  From reading the documentation it looks like I 
> have
> to create an array that holds a reference to each master object  (as 
> opposed
> to an index or name) that I want to drop since I want to drop the masters
> onto a document that is not the stencil's document.  I cannot get the code 
> to
> work though. I get error  "Method DropMany of object IVPage failed"
>
> I can't figure out what is wrong... any ideas? Using visio 2000
>
>
>    Dim stencil As Visio.Document
>    Dim sCurState As String
>    Dim theMaster As Visio.Master
>    Dim allMasters() As Variant
>    Dim xyArray() As Double
>    Dim idArray() As Integer
>
>    For lCounter = 1 To 49
>
>        sCurState = sStateCodes(lCounter)
>        Set stencil = vA.Documents.OpenEx("C:\MyFiles\Stencils\CO_" &
> sCurState & ".vss", visOpenDocked)
>
>        'Create array holding indices to each master in the stencil
>        ReDim allMasters(1 To stencil.Masters.Count)
>        ReDim xyArray(1 To stencil.Masters.Count * 2)
>        ReDim xyArray(1 To stencil.Masters.Count * 2)
>        Dim i As Long
>        For i = 1 To stencil.Masters.Count
>
>            allMasters(i) = stencil.Masters(i)
>            xyArray(i * 2 - 1) = i
>            xyArray(i * 2) = i
>
>        Next i
>        Dim lShapes As Integer
>        lShapes = vD.Pages(1).DropMany(allMasters, xyArray, idArray)
>
>        stencil.Close
>    Next lCounter
>
>
date: Thu, 14 Jul 2005 23:07:10 -0700   author:   Mark Nelson [MS]

Re: Dropmany error   
It's not being set anywhere other than the declaration.  According to the 
documentation idArray is filled with the identifiers of the masters that are 
successfully dropped after the execution of dropmany.  And that is how it is 
shown in the example code in the documentation. 
I did try reDim-ing it to the number of masters and setting idArray  but it 
still resulted in the same error.

"Mark Nelson [MS]" wrote:

> Where are you setting idArray?
> 
> -- 
> Mark Nelson
> Microsoft Corporation
> 
> This posting is provided "AS IS" with no warranties, and confers no rights.
> 
> "adb"  wrote in message 
> news:8B344E85-9FFF-4D08-8B80-D4935D7F5190@microsoft.com...
> > I'm trying to use Dropmany to drop a bunch of masters (from multiple
> > stencils) onto a page.  From reading the documentation it looks like I 
> > have
> > to create an array that holds a reference to each master object  (as 
> > opposed
> > to an index or name) that I want to drop since I want to drop the masters
> > onto a document that is not the stencil's document.  I cannot get the code 
> > to
> > work though. I get error  "Method DropMany of object IVPage failed"
> >
> > I can't figure out what is wrong... any ideas? Using visio 2000
> >
> >
> >    Dim stencil As Visio.Document
> >    Dim sCurState As String
> >    Dim theMaster As Visio.Master
> >    Dim allMasters() As Variant
> >    Dim xyArray() As Double
> >    Dim idArray() As Integer
> >
> >    For lCounter = 1 To 49
> >
> >        sCurState = sStateCodes(lCounter)
> >        Set stencil = vA.Documents.OpenEx("C:\MyFiles\Stencils\CO_" &
> > sCurState & ".vss", visOpenDocked)
> >
> >        'Create array holding indices to each master in the stencil
> >        ReDim allMasters(1 To stencil.Masters.Count)
> >        ReDim xyArray(1 To stencil.Masters.Count * 2)
> >        ReDim xyArray(1 To stencil.Masters.Count * 2)
> >        Dim i As Long
> >        For i = 1 To stencil.Masters.Count
> >
> >            allMasters(i) = stencil.Masters(i)
> >            xyArray(i * 2 - 1) = i
> >            xyArray(i * 2) = i
> >
> >        Next i
> >        Dim lShapes As Integer
> >        lShapes = vD.Pages(1).DropMany(allMasters, xyArray, idArray)
> >
> >        stencil.Close
> >    Next lCounter
> >
> > 
> 
> 
>
date: Fri, 15 Jul 2005 05:54:08 -0700   author:   adb

Re: Dropmany error   
OK.  I've looked into this a bit more.   I am using Visio 2003.  This is the 
text from the Help topic:

<Cut>
You can identify which master to drop by passing the DropMany method a 
Master object or the master's index or the master's name. When you pass an 
object, DropMany isn't constrained to just dropping a master from the 
document stencil of the document onto which it is being dropped. The object 
can be a master from another document or another type of object.
</Cut>

It appears to me that DropMany using a Master object from another document 
is broken.  I was successful with DropMany using either a Master object or 
Master name from the Document Stencil.  Check out this paragraph that 
follows from the Help topic:

<Cut>
Passing integers (master indices) or strings (master names) to DropMany is 
faster than passing objects, but integers or strings can identify only 
masters in the document stencil of the document onto which it is being 
dropped. Hence your program has to somehow get the masters in question into 
the document stencil in the first place, provided they weren't there 
already.
</Cut>

This indicates that a good workaround would be to drop each of the masters 
into the local document stencil first and then use DropMany with the local 
versions of the masters.  If you need to drop more than one of each master, 
I would recommend this solution.  If you are only going to use each master 
once, I would not use DropMany at all.  The performance benefits of DropMany 
over Drop are not substantial.

-- 
Mark Nelson
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.

"adb"  wrote in message 
news:7C8A994C-0D40-44C5-B234-DF9E0A52EA8F@microsoft.com...
> It's not being set anywhere other than the declaration.  According to the
> documentation idArray is filled with the identifiers of the masters that 
> are
> successfully dropped after the execution of dropmany.  And that is how it 
> is
> shown in the example code in the documentation.
> I did try reDim-ing it to the number of masters and setting idArray  but 
> it
> still resulted in the same error.
>
> "Mark Nelson [MS]" wrote:
>
>> Where are you setting idArray?
>>
>> -- 
>> Mark Nelson
>> Microsoft Corporation
>>
>> This posting is provided "AS IS" with no warranties, and confers no 
>> rights.
>>
>> "adb"  wrote in message
>> news:8B344E85-9FFF-4D08-8B80-D4935D7F5190@microsoft.com...
>> > I'm trying to use Dropmany to drop a bunch of masters (from multiple
>> > stencils) onto a page.  From reading the documentation it looks like I
>> > have
>> > to create an array that holds a reference to each master object  (as
>> > opposed
>> > to an index or name) that I want to drop since I want to drop the 
>> > masters
>> > onto a document that is not the stencil's document.  I cannot get the 
>> > code
>> > to
>> > work though. I get error  "Method DropMany of object IVPage failed"
>> >
>> > I can't figure out what is wrong... any ideas? Using visio 2000
>> >
>> >
>> >    Dim stencil As Visio.Document
>> >    Dim sCurState As String
>> >    Dim theMaster As Visio.Master
>> >    Dim allMasters() As Variant
>> >    Dim xyArray() As Double
>> >    Dim idArray() As Integer
>> >
>> >    For lCounter = 1 To 49
>> >
>> >        sCurState = sStateCodes(lCounter)
>> >        Set stencil = vA.Documents.OpenEx("C:\MyFiles\Stencils\CO_" &
>> > sCurState & ".vss", visOpenDocked)
>> >
>> >        'Create array holding indices to each master in the stencil
>> >        ReDim allMasters(1 To stencil.Masters.Count)
>> >        ReDim xyArray(1 To stencil.Masters.Count * 2)
>> >        ReDim xyArray(1 To stencil.Masters.Count * 2)
>> >        Dim i As Long
>> >        For i = 1 To stencil.Masters.Count
>> >
>> >            allMasters(i) = stencil.Masters(i)
>> >            xyArray(i * 2 - 1) = i
>> >            xyArray(i * 2) = i
>> >
>> >        Next i
>> >        Dim lShapes As Integer
>> >        lShapes = vD.Pages(1).DropMany(allMasters, xyArray, idArray)
>> >
>> >        stencil.Close
>> >    Next lCounter
>> >
>> >
>>
>>
>>
date: Fri, 15 Jul 2005 22:24:01 -0700   author:   Mark Nelson [MS]

Re: Dropmany error   
d'oh, that stinks, but thanks for looking into it.
Unfortunately, on my system (Pentium 3, 500 MHz, 128MB Ram) there seems to 
be a huge performance difference between Drop and Dropmany.  Also I am only 
using each master one time, so looks like I'm gonna just have to use drop.  I 
was trying to see how much visio could handle on my system because I was 
going to go about dropping a couple thousand masters (all the counties of the 
US), but I don't think my PC can handle it.

Thanks for the help.

"Mark Nelson [MS]" wrote:

> OK.  I've looked into this a bit more.   I am using Visio 2003.  This is the 
> text from the Help topic:
> 
> <Cut>
> You can identify which master to drop by passing the DropMany method a 
> Master object or the master's index or the master's name. When you pass an 
> object, DropMany isn't constrained to just dropping a master from the 
> document stencil of the document onto which it is being dropped. The object 
> can be a master from another document or another type of object.
> </Cut>
> 
> It appears to me that DropMany using a Master object from another document 
> is broken.  I was successful with DropMany using either a Master object or 
> Master name from the Document Stencil.  Check out this paragraph that 
> follows from the Help topic:
> 
> <Cut>
> Passing integers (master indices) or strings (master names) to DropMany is 
> faster than passing objects, but integers or strings can identify only 
> masters in the document stencil of the document onto which it is being 
> dropped. Hence your program has to somehow get the masters in question into 
> the document stencil in the first place, provided they weren't there 
> already.
> </Cut>
> 
> This indicates that a good workaround would be to drop each of the masters 
> into the local document stencil first and then use DropMany with the local 
> versions of the masters.  If you need to drop more than one of each master, 
> I would recommend this solution.  If you are only going to use each master 
> once, I would not use DropMany at all.  The performance benefits of DropMany 
> over Drop are not substantial.
> 
> -- 
> Mark Nelson
> Microsoft Corporation
> 
> This posting is provided "AS IS" with no warranties, and confers no rights.
> 
> "adb"  wrote in message 
> news:7C8A994C-0D40-44C5-B234-DF9E0A52EA8F@microsoft.com...
> > It's not being set anywhere other than the declaration.  According to the
> > documentation idArray is filled with the identifiers of the masters that 
> > are
> > successfully dropped after the execution of dropmany.  And that is how it 
> > is
> > shown in the example code in the documentation.
> > I did try reDim-ing it to the number of masters and setting idArray  but 
> > it
> > still resulted in the same error.
> >
> > "Mark Nelson [MS]" wrote:
> >
> >> Where are you setting idArray?
> >>
> >> -- 
> >> Mark Nelson
> >> Microsoft Corporation
> >>
> >> This posting is provided "AS IS" with no warranties, and confers no 
> >> rights.
> >>
> >> "adb"  wrote in message
> >> news:8B344E85-9FFF-4D08-8B80-D4935D7F5190@microsoft.com...
> >> > I'm trying to use Dropmany to drop a bunch of masters (from multiple
> >> > stencils) onto a page.  From reading the documentation it looks like I
> >> > have
> >> > to create an array that holds a reference to each master object  (as
> >> > opposed
> >> > to an index or name) that I want to drop since I want to drop the 
> >> > masters
> >> > onto a document that is not the stencil's document.  I cannot get the 
> >> > code
> >> > to
> >> > work though. I get error  "Method DropMany of object IVPage failed"
> >> >
> >> > I can't figure out what is wrong... any ideas? Using visio 2000
> >> >
> >> >
> >> >    Dim stencil As Visio.Document
> >> >    Dim sCurState As String
> >> >    Dim theMaster As Visio.Master
> >> >    Dim allMasters() As Variant
> >> >    Dim xyArray() As Double
> >> >    Dim idArray() As Integer
> >> >
> >> >    For lCounter = 1 To 49
> >> >
> >> >        sCurState = sStateCodes(lCounter)
> >> >        Set stencil = vA.Documents.OpenEx("C:\MyFiles\Stencils\CO_" &
> >> > sCurState & ".vss", visOpenDocked)
> >> >
> >> >        'Create array holding indices to each master in the stencil
> >> >        ReDim allMasters(1 To stencil.Masters.Count)
> >> >        ReDim xyArray(1 To stencil.Masters.Count * 2)
> >> >        ReDim xyArray(1 To stencil.Masters.Count * 2)
> >> >        Dim i As Long
> >> >        For i = 1 To stencil.Masters.Count
> >> >
> >> >            allMasters(i) = stencil.Masters(i)
> >> >            xyArray(i * 2 - 1) = i
> >> >            xyArray(i * 2) = i
> >> >
> >> >        Next i
> >> >        Dim lShapes As Integer
> >> >        lShapes = vD.Pages(1).DropMany(allMasters, xyArray, idArray)
> >> >
> >> >        stencil.Close
> >> >    Next lCounter
> >> >
> >> >
> >>
> >>
> >> 
> 
> 
>
date: Mon, 18 Jul 2005 06:21:03 -0700   author:   adb

Re: Dropmany error   
I really do not recommend running Visio with 128MB RAM.  That may be enough 
for basic diagramming, but not for programming or doing large drawings.  You 
will see significant perf gains with 256MB and even more significant gains 
with 512MB.

-- 
Mark Nelson
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.

"adb"  wrote in message 
news:DD08E5B9-84E1-4A3C-92AC-91627B3B1D32@microsoft.com...
> d'oh, that stinks, but thanks for looking into it.
> Unfortunately, on my system (Pentium 3, 500 MHz, 128MB Ram) there seems to
> be a huge performance difference between Drop and Dropmany.  Also I am 
> only
> using each master one time, so looks like I'm gonna just have to use drop. 
> I
> was trying to see how much visio could handle on my system because I was
> going to go about dropping a couple thousand masters (all the counties of 
> the
> US), but I don't think my PC can handle it.
>
> Thanks for the help.
>
> "Mark Nelson [MS]" wrote:
>
>> OK.  I've looked into this a bit more.   I am using Visio 2003.  This is 
>> the
>> text from the Help topic:
>>
>> <Cut>
>> You can identify which master to drop by passing the DropMany method a
>> Master object or the master's index or the master's name. When you pass 
>> an
>> object, DropMany isn't constrained to just dropping a master from the
>> document stencil of the document onto which it is being dropped. The 
>> object
>> can be a master from another document or another type of object.
>> </Cut>
>>
>> It appears to me that DropMany using a Master object from another 
>> document
>> is broken.  I was successful with DropMany using either a Master object 
>> or
>> Master name from the Document Stencil.  Check out this paragraph that
>> follows from the Help topic:
>>
>> <Cut>
>> Passing integers (master indices) or strings (master names) to DropMany 
>> is
>> faster than passing objects, but integers or strings can identify only
>> masters in the document stencil of the document onto which it is being
>> dropped. Hence your program has to somehow get the masters in question 
>> into
>> the document stencil in the first place, provided they weren't there
>> already.
>> </Cut>
>>
>> This indicates that a good workaround would be to drop each of the 
>> masters
>> into the local document stencil first and then use DropMany with the 
>> local
>> versions of the masters.  If you need to drop more than one of each 
>> master,
>> I would recommend this solution.  If you are only going to use each 
>> master
>> once, I would not use DropMany at all.  The performance benefits of 
>> DropMany
>> over Drop are not substantial.
>>
>> -- 
>> Mark Nelson
>> Microsoft Corporation
>>
>> This posting is provided "AS IS" with no warranties, and confers no 
>> rights.
>>
>> "adb"  wrote in message
>> news:7C8A994C-0D40-44C5-B234-DF9E0A52EA8F@microsoft.com...
>> > It's not being set anywhere other than the declaration.  According to 
>> > the
>> > documentation idArray is filled with the identifiers of the masters 
>> > that
>> > are
>> > successfully dropped after the execution of dropmany.  And that is how 
>> > it
>> > is
>> > shown in the example code in the documentation.
>> > I did try reDim-ing it to the number of masters and setting idArray 
>> > but
>> > it
>> > still resulted in the same error.
>> >
>> > "Mark Nelson [MS]" wrote:
>> >
>> >> Where are you setting idArray?
>> >>
>> >> -- 
>> >> Mark Nelson
>> >> Microsoft Corporation
>> >>
>> >> This posting is provided "AS IS" with no warranties, and confers no
>> >> rights.
>> >>
>> >> "adb"  wrote in message
>> >> news:8B344E85-9FFF-4D08-8B80-D4935D7F5190@microsoft.com...
>> >> > I'm trying to use Dropmany to drop a bunch of masters (from multiple
>> >> > stencils) onto a page.  From reading the documentation it looks like 
>> >> > I
>> >> > have
>> >> > to create an array that holds a reference to each master object  (as
>> >> > opposed
>> >> > to an index or name) that I want to drop since I want to drop the
>> >> > masters
>> >> > onto a document that is not the stencil's document.  I cannot get 
>> >> > the
>> >> > code
>> >> > to
>> >> > work though. I get error  "Method DropMany of object IVPage failed"
>> >> >
>> >> > I can't figure out what is wrong... any ideas? Using visio 2000
>> >> >
>> >> >
>> >> >    Dim stencil As Visio.Document
>> >> >    Dim sCurState As String
>> >> >    Dim theMaster As Visio.Master
>> >> >    Dim allMasters() As Variant
>> >> >    Dim xyArray() As Double
>> >> >    Dim idArray() As Integer
>> >> >
>> >> >    For lCounter = 1 To 49
>> >> >
>> >> >        sCurState = sStateCodes(lCounter)
>> >> >        Set stencil = vA.Documents.OpenEx("C:\MyFiles\Stencils\CO_" &
>> >> > sCurState & ".vss", visOpenDocked)
>> >> >
>> >> >        'Create array holding indices to each master in the stencil
>> >> >        ReDim allMasters(1 To stencil.Masters.Count)
>> >> >        ReDim xyArray(1 To stencil.Masters.Count * 2)
>> >> >        ReDim xyArray(1 To stencil.Masters.Count * 2)
>> >> >        Dim i As Long
>> >> >        For i = 1 To stencil.Masters.Count
>> >> >
>> >> >            allMasters(i) = stencil.Masters(i)
>> >> >            xyArray(i * 2 - 1) = i
>> >> >            xyArray(i * 2) = i
>> >> >
>> >> >        Next i
>> >> >        Dim lShapes As Integer
>> >> >        lShapes = vD.Pages(1).DropMany(allMasters, xyArray, idArray)
>> >> >
>> >> >        stencil.Close
>> >> >    Next lCounter
>> >> >
>> >> >
>> >>
>> >>
>> >>
>>
>>
>>
date: Mon, 18 Jul 2005 20:40:54 -0700   author:   Mark Nelson [MS]

Re: Dropmany error   
Oh believe me, I don't recommend it either ;)
But I have no choice....thankfully in a month or so we are finally getting 
upgraded to P4 with 1 GB RAM.... happy days to come :)

"Mark Nelson [MS]" wrote:

> I really do not recommend running Visio with 128MB RAM.  That may be enough 
> for basic diagramming, but not for programming or doing large drawings.  You 
> will see significant perf gains with 256MB and even more significant gains 
> with 512MB.
> 
> -- 
> Mark Nelson
> Microsoft Corporation
> 
> This posting is provided "AS IS" with no warranties, and confers no rights.
> 
> "adb"  wrote in message 
> news:DD08E5B9-84E1-4A3C-92AC-91627B3B1D32@microsoft.com...
> > d'oh, that stinks, but thanks for looking into it.
> > Unfortunately, on my system (Pentium 3, 500 MHz, 128MB Ram) there seems to
> > be a huge performance difference between Drop and Dropmany.  Also I am 
> > only
> > using each master one time, so looks like I'm gonna just have to use drop. 
> > I
> > was trying to see how much visio could handle on my system because I was
> > going to go about dropping a couple thousand masters (all the counties of 
> > the
> > US), but I don't think my PC can handle it.
> >
> > Thanks for the help.
> >
> > "Mark Nelson [MS]" wrote:
> >
> >> OK.  I've looked into this a bit more.   I am using Visio 2003.  This is 
> >> the
> >> text from the Help topic:
> >>
> >> <Cut>
> >> You can identify which master to drop by passing the DropMany method a
> >> Master object or the master's index or the master's name. When you pass 
> >> an
> >> object, DropMany isn't constrained to just dropping a master from the
> >> document stencil of the document onto which it is being dropped. The 
> >> object
> >> can be a master from another document or another type of object.
> >> </Cut>
> >>
> >> It appears to me that DropMany using a Master object from another 
> >> document
> >> is broken.  I was successful with DropMany using either a Master object 
> >> or
> >> Master name from the Document Stencil.  Check out this paragraph that
> >> follows from the Help topic:
> >>
> >> <Cut>
> >> Passing integers (master indices) or strings (master names) to DropMany 
> >> is
> >> faster than passing objects, but integers or strings can identify only
> >> masters in the document stencil of the document onto which it is being
> >> dropped. Hence your program has to somehow get the masters in question 
> >> into
> >> the document stencil in the first place, provided they weren't there
> >> already.
> >> </Cut>
> >>
> >> This indicates that a good workaround would be to drop each of the 
> >> masters
> >> into the local document stencil first and then use DropMany with the 
> >> local
> >> versions of the masters.  If you need to drop more than one of each 
> >> master,
> >> I would recommend this solution.  If you are only going to use each 
> >> master
> >> once, I would not use DropMany at all.  The performance benefits of 
> >> DropMany
> >> over Drop are not substantial.
> >>
> >> -- 
> >> Mark Nelson
> >> Microsoft Corporation
> >>
> >> This posting is provided "AS IS" with no warranties, and confers no 
> >> rights.
> >>
> >> "adb"  wrote in message
> >> news:7C8A994C-0D40-44C5-B234-DF9E0A52EA8F@microsoft.com...
> >> > It's not being set anywhere other than the declaration.  According to 
> >> > the
> >> > documentation idArray is filled with the identifiers of the masters 
> >> > that
> >> > are
> >> > successfully dropped after the execution of dropmany.  And that is how 
> >> > it
> >> > is
> >> > shown in the example code in the documentation.
> >> > I did try reDim-ing it to the number of masters and setting idArray 
> >> > but
> >> > it
> >> > still resulted in the same error.
> >> >
> >> > "Mark Nelson [MS]" wrote:
> >> >
> >> >> Where are you setting idArray?
> >> >>
> >> >> -- 
> >> >> Mark Nelson
> >> >> Microsoft Corporation
> >> >>
> >> >> This posting is provided "AS IS" with no warranties, and confers no
> >> >> rights.
> >> >>
> >> >> "adb"  wrote in message
> >> >> news:8B344E85-9FFF-4D08-8B80-D4935D7F5190@microsoft.com...
> >> >> > I'm trying to use Dropmany to drop a bunch of masters (from multiple
> >> >> > stencils) onto a page.  From reading the documentation it looks like 
> >> >> > I
> >> >> > have
> >> >> > to create an array that holds a reference to each master object  (as
> >> >> > opposed
> >> >> > to an index or name) that I want to drop since I want to drop the
> >> >> > masters
> >> >> > onto a document that is not the stencil's document.  I cannot get 
> >> >> > the
> >> >> > code
> >> >> > to
> >> >> > work though. I get error  "Method DropMany of object IVPage failed"
> >> >> >
> >> >> > I can't figure out what is wrong... any ideas? Using visio 2000
> >> >> >
> >> >> >
> >> >> >    Dim stencil As Visio.Document
> >> >> >    Dim sCurState As String
> >> >> >    Dim theMaster As Visio.Master
> >> >> >    Dim allMasters() As Variant
> >> >> >    Dim xyArray() As Double
> >> >> >    Dim idArray() As Integer
> >> >> >
> >> >> >    For lCounter = 1 To 49
> >> >> >
> >> >> >        sCurState = sStateCodes(lCounter)
> >> >> >        Set stencil = vA.Documents.OpenEx("C:\MyFiles\Stencils\CO_" &
> >> >> > sCurState & ".vss", visOpenDocked)
> >> >> >
> >> >> >        'Create array holding indices to each master in the stencil
> >> >> >        ReDim allMasters(1 To stencil.Masters.Count)
> >> >> >        ReDim xyArray(1 To stencil.Masters.Count * 2)
> >> >> >        ReDim xyArray(1 To stencil.Masters.Count * 2)
> >> >> >        Dim i As Long
> >> >> >        For i = 1 To stencil.Masters.Count
> >> >> >
> >> >> >            allMasters(i) = stencil.Masters(i)
> >> >> >            xyArray(i * 2 - 1) = i
> >> >> >            xyArray(i * 2) = i
> >> >> >
> >> >> >        Next i
> >> >> >        Dim lShapes As Integer
> >> >> >        lShapes = vD.Pages(1).DropMany(allMasters, xyArray, idArray)
> >> >> >
> >> >> >        stencil.Close
> >> >> >    Next lCounter
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >>
> >>
> >>
> >> 
> 
> 
>
date: Tue, 19 Jul 2005 07:16:08 -0700   author:   adb

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us