Hi all,
anybody knows how to (sucessfully :-) use the addcollection-method in Visual Basic?
Sample (want to get all sequence charts of a model):
Private Sub Form_Load()
Dim g_oRatRos As New RationalRose.RoseApplication
' insert path to existing model with seqence charts
g_oRatRos.OpenModel "D:\Programme\Rational\Rose\testDM.mdl"
Dim AllCats As Integer
Dim alltheSeqCharts As New RoseScenarioDiagramCollection
Dim SeqChartColl As RoseScenarioDiagramCollection
Set theCategories = g_oRatRos.CurrentModel.GetAllCategories()
For AllCats = 1 To theCategories.Count
Set SeqChartColl = theCategories.GetAt(AllCats).ScenarioDiagrams
If SeqChartColl.Count > 0 And Not (SeqChartColl Is Nothing) Then
alltheSeqCharts.AddCollection SeqChartColl
End If
Next AllCats
g_oRatRos.Exit
Set g_oRatRos = Nothing
End Sub
The sample code says: Parameter 1 contains an invalid value
Well I don't believe this since i've checked value of collection in debugger.
Also iteration works well with this collection! Why not adding?
Thanks in advance
Rainer
P.S.: Of Course I have a reference to the rose typelib
______________________________________________________________________________
Die Fachpresse ist sich einig: WEB.DE 18mal Testsieger! Kostenlos E-Mail,
Fax, SMS, Verschlüsselung, POP3, WAP....testen Sie uns! http://freemail.web.de
************************************************************************
* Rose Forum is a public venue for ideas and discussions.
* For technical support, visit http://www.rational.com/support
*
* Admin.Subscription Requests: [EMAIL PROTECTED]
* Archive of messages:
http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
* Other Requests: [EMAIL PROTECTED]
*
* To unsubscribe from the list, please send email
*
* To: [EMAIL PROTECTED]
* Subject:<BLANK>
* Body: unsubscribe rose_forum
*
*************************************************************************