' Script: TypeLib Importer ' ' Author: Michael Moors ' ' Source: http://www.rationalrose.com/scripts/typelibimporter.htm ' Sub Main() Const TypeLibPath = "K:\Program Files\Rational\Rose 2000\RationalRose.tlb" Set TLIApp = CreateObject("TLI.TLIApplication") Set TLB = TLIApp.TypeLibInfoFromFile(TypeLibPath) 'Open the typelib 'MsgBox TLB.Name Dim roseapp As RoseApplication Set roseapp = GetObject(, "Rose.Application") Dim ro As Object ' Set ro = roseapp.CurrentModel.RootCategory.GetObject() 'Rose script version Set ro = roseapp.CurrentModel '.RootCategory.Classes.GetAt(1) clsname = ro.IdentifyClass clsnumber = TLB.GetTypeInfoNumber("Rose" + clsname) Dim theTypeInfo As TypeInfo Set theTypeInfo = TLB.GetTypeInfo(clsnumber) MsgBox theTypeInfo.Name Dim theInterfaces As Interfaces Set theInterfaces = theTypeInfo.Interfaces For X = 1 To theInterfaces.Count MsgBox theInterfaces.Item(X).Name ' display interface name For Y = 1 To theInterfaces.Item(X).Members.Count MsgBox theInterfaces.Item(X).Members.Item(Y).Name Next Y Next X ' Not supported, but would have been a lot easier: ' Set TLIApp = CreateObject("TLI.TLIApplication") ' Set theTypeInfo = TLIApp.ClassInfoFromObject(ro) End Sub