Vishu,
Thank you very much !! This was exactly what I was looking for. I tried to
figure out the 'RoseApp.SelectObjectInBrowser ' bit, but I could not find
the method to use (i.e. SelectObjectInBrowser ) in the help-files.
Thanks again, and I look forward to the final version of the script :-)
Regards
Arne
> -----Original Message-----
> From: Annamalai Viswanathan [mailto:[EMAIL PROTECTED]]
> Sent: 22. november 2000 17:14
> To: Tim Bohn
> Cc: 'Arne G. Styve'; 'rose_forum@Rational. Com'
> Subject: Re: (ROSE) Script for finding a class...
>
>
> Arne,
>
> Try this script:
>
> <<START SCRIPT>>
> Sub Main
> Begin Dialog UserDialog ,,180,48,"Find Class"
> OKButton 132,8,40,14
> CancelButton 132,28,40,14
> Text 12,11,60,8,"Class to find:",.Text1
> TextBox 12,30,104,12,.ClassName
> End Dialog
>
> Dim MyDialog As UserDialog
> Dim theModel As Model
> Dim theClass As Class
> Dim theClasses As ClassCollection
> Dim ClassName As String
> Dim FullyQualifiedName As String
>
>
> Viewport.open "Classes found"
>
> result = Dialog(MyDialog)
> ClassName = MyDialog.ClassName
> Set theModel = RoseApp.CurrentModel
> Set theClasses = theModel.GetAllClasses()
>
> For i = 1 To theClasses.Count
> Set theClass = theClasses.GetAt(i)
>
> If theClass.Name = ClassName Then
> FullyQualifiedName = theClass.GetQualifiedName
> Print FullyQualifiedName
> RoseApp.SelectObjectInBrowser theClass
> End If
> Next i
>
> End Sub
> <<END SCRIPT>>
>
> It has a few problems, i.e. if there multiple classes with the
> same name it will
> only give you the first one etc. but it does what you want. I am
> still working
> on it. I'll get the improved version out to you when I complete it.
>
> Vishu
>
>
>
> Tim Bohn wrote:
>
> > Until you find such a script, in the short run you can then right-click
> > on the element and pick "Select in Browser" to get where you want to go.
> >
> > Tim Bohn
> > Tech Lead
> > Silicon Beach District
> >
> > Rational Software
> > the e-development company
> > _____
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Arne G. Styve
> > Sent: Wednesday, November 22, 2000 7:09 AM
> > To: Annamalai Viswanathan
> > Cc: rose_forum@Rational. Com
> > Subject: RE: (ROSE) Script for finding a class...
> >
> > Vishu,
> >
> > Thanks for pointing this out to me. I forgot to mention in my
> prev. mail,
> > that I am aware of the Edit->Find.
> > Although it does cover most needs, I would have liked to be able to go
> > directly to the browser, instead of to a diagram where the
> class is shown.
> >
> > So a script is still on my wish-list :-)
> >
> > Regards
> >
> > Arne
> >
> > > -----Original Message-----
> > > From: Annamalai Viswanathan [mailto:[EMAIL PROTECTED]]
> > > Sent: 22. november 2000 15:35
> > > To: Arne G. Styve
> > > Cc: rose_forum@Rational. Com
> > > Subject: Re: (ROSE) Script for finding a class...
> > >
> > >
> > > Arne,
> > >
> > > Rose has this functionality built into it already. Just do an
> > > Edit->Find and type in the
> > > name of the model element that you are looking for.
> > >
> > > Vishu
> > >
> > >
> > >
> > > "Arne G. Styve" wrote:
> > >
> > > > Hi,
> > > >
> > > > Does anyone have, or know of a simple script to find a class in
> > > our model ?
> > > >
> > > > What I'm looking for is something like a small dialog where
> I can easely
> > > > find a class in the model (either throug search, or an
> > > alphabetically sorted
> > > > list of classes, and by selecting a class, the class is
> selected in the
> > > > browser (simmelar to the "Select in Browser" function when you
> > > rigth-click
> > > > in a class-diagram.
> > > >
> > > > Arne
> > > >
> > > >
> ************************************************************************
> > > > * 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
> > > > *
> > > >
> > >
> *************************************************************************
> > >
> > > --
> > > ---
> > > Annamalai "Vishu" Viswanathan -- [EMAIL PROTECTED]
> > > Rose Technical Support Engineer
> > > Rational Software
> > >
> > > (800)433-5444 (Rational Support)
> > >
> > > Check out http://www.rosearchitect.com/ for tips and news for
> Rose users
> > >
> > > ---
> > >
> > >
> >
> > ************************************************************************
> > * 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
> > *
> >
> *************************************************************************
>
> --
> ---
> Annamalai "Vishu" Viswanathan -- [EMAIL PROTECTED]
> Rose Technical Support Engineer
> Rational Software
>
> (800)433-5444 (Rational Support)
>
> Check out http://www.rosearchitect.com/ for tips and news for Rose users
>
> ---
>
>
************************************************************************
* 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
*
*************************************************************************