BusinessObjects Board

making new universe in BO using VBA SDK ??!!!

hello
i don’t know if it’s possible, but i want to make new universe in BO using some macros in VBA
i’m the beginner in BO, so don’t be angry :wink:
maybe somebody has some materials about it??

thanks for help !!!
przemek


bobek (BOB member since 2007-01-23)

My first question is why! The Designer module exists to create universes - you don’t want to reinvent the wheel…perhaps give us some background as to what your requirements are.

Welcome to B:bob:B!


Nick Daniels :uk: (BOB member since 2002-08-15)

my boss asked me to make this kind of macro
today i’ve installed BO on my PC - i’m real beginner

what i know, is when you want to make a big, complex universe you have to “click” many times
maybe making the macro would help
maybe you know any ways to make the new universe ‘automatic’??

thanks for help and any piece of information !!!


bobek (BOB member since 2007-01-23)

You’ll fail and waste a TON of time trying to this. Yo have a fantastic tool that that lots of options.

What’s the source of your universe. If the issue is that you want to import definitons from Informatica or DataIntegrator, then you have some options.

But, it’s impossible to automate the building of a proper universe. I don’t care what tool you use. Universe development is as much art as science.


Steve Krandel :us: (BOB member since 2002-06-25)

thanks for info !!!
i’ll tell this my boss :wink:

so there’s no better way than making universe in Designer??
take care !!


bobek (BOB member since 2007-01-23)

That’s not a good way to put it. Designer is THE tool made specifically for building universes. Why would you want to reinvent something that works so well?


Steve Krandel :us: (BOB member since 2002-06-25)

ok, maybe i’ll explain what kind of macro i want to make
i have in one universe many parametrs, and no description connected to them
i don’t want to add these description manually, i can export to excel file from database “mapping table”: parametr<->description
and i want to add them automatically - it’d be faster !!
i’ve tried to join BO from VB macro, i used some scripts which i’ve found on Internet, i made sth like that:



Sub Main_()
'Dim ObjDes As New Designer.Application
Dim ObjUniverse As Designer.Universe
Dim i As Integer
Dim UniverseName As String
UniverseName = "/Universe/WHKPI_44"

Set ObjDes = CreateObject("Designer.Application")
Range("A1").Select
ActiveCell.FormulaR1C1 = ObjDes.Version

ObjDes.Visible = True
Call ObjDes.LoginAs("user1", "pass", True) 
Set ObjUniverse = ObjDes.Universes.Open(UniverseName)

Call ListColumns(ObjUniverse.Tables)
Call ListTables(ObjUniverse.Tables)
End Sub


Sub ListColumns(Tbls As Designer.Tables)
    Dim Tbl As Designer.Table
    Dim Col As Designer.Column
    Dim Rng As Excel.Range
    Dim RowNum As Long
    
    Set Rng = Sheets("Arkusz2").Cells
    RowNum = 1
   For Each Tbl In Tbls
            For Each Col In Tbl.Columns
               RowNum = RowNum + 1
                    Rng(RowNum, 1) = Tbl.Name
                    Rng(RowNum, 2) = Col.Name
                    Rng(RowNum, 3) = Col.Type
          Next Col
    Next Tbl
CleanUp:
    Set Col = Nothing
    Set Tbl = Nothing
    Exit Sub
End Sub


Sub ListTables(Tbls As Designer.Tables)
    Dim Tbl As Designer.Table
    Dim Rng As Excel.Range
    Dim RowNum As Long

    Set Rng = Sheets("Arkusz3").Cells
    RowNum = 1
    For Each Tbl In Tbls
        RowNum = RowNum + 1
        Rng(RowNum, 1) = Tbl.Name
    Next Tbl
CleanUp:
    Set Tbl = Nothing
    Exit Sub

End Sub

using this code i can only read table_names and col_names from specific universe
is it possible to list also all descriptions???
and change them or add the new one??
i don’t know any functions, etc … ;/
generally i don’t know how to change sth in BO universe using VB

i hope that right now i’ve clearly explained what i want to do,
i think that begginning with BO is not very easy :wink:
sorry for my english :wink:
thanks for any help !!!
take care


bobek (BOB member since 2007-01-23)

Dude,

You’re not in good shape… There is a Description attribute that is accessible in the Object class and in the Class class (BO’s naming convention is conflicting with OO programming here…), but if you don’t know VBA, this is not going to do you too much good.

I don’t think your problem is a limitation of the SDK. I think you are restricted by your lack of expertise with VBA. I think you would be better off getting a contractor to pull this off.


broccoli :us: (BOB member since 2005-03-10)

Indeed … just look here for a utility designed to do just that.

As an academic exercise, you might look at this utility that explores virtually everything in a universe.


Dwayne Hoffpauir :us: (BOB member since 2002-09-19)

i’m know that i’m real beginner in VB and BO, but i want to try to make this macro

thanks for help !!!


bobek (BOB member since 2007-01-23)