BusinessObjects Board

How to get ID’s Object from universe via Designer SDK

I use VB sources from the application : Document a universe using Excel and the Designer SDK (Version XIr2)
How can I, in the collections either objects or object, retrieve the ID of the items.
I can get all the information at the object level except the ID

After opening an universe
Set Univ = DesApp.Universes.Open

Call ListObjects(Univ.Classes)

Sub ListObjects(Clss As Designer.Classes)

Dim Cls As Designer.Class
Dim Obj As Designer.Object

For Each Cls In Clss
    For Each Obj In Cls.Objects

        Debug.print Cls.Name
        Debug.print Obj.Name
        Debug.print Obj.Type
        Debug.print Obj.Description
        Debug.print Obj.Select
        Debug.print Obj.Where
        ….
        
    Next Obj         
Next Cls

En sub


gana3000 :fr: (BOB member since 2007-04-19)

There is a hidden property (cleverly named .ID) that returns the internal ID for the object. Try Obj.ID and you will get what you are after.

I can’t begin to guess why it’s hidden. Right click in the VBE Object Browser, and turn on the Show Hidden Members option, to see the property and others. I’m sure the risk is that the property will be deprecated (removed) in the future, and BusObj would be under no obligation to disclose it.


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

would you please add the updated code to document the object ID as well. I will really appriciate your help


rpatel (BOB member since 2007-10-17)

Respectfully, I decline. The code and utilities I share here are hopefully useful on their own, but are also here as learning tools. Take a few minutes to look at the code, and I’m sure you can make the update yourself. I chose not to include that property in the utility because it is a hidden property that may stop working in a future release.

Now, if you care to contract with me for a customized version I’ll be glad to consider it, but I doubt you’d like my rates :smiley: .


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

ahhh! Thanks for the offer. You really helped me update my skills and now i am able to modify the code and get object id populated. Thanks


rpatel (BOB member since 2007-10-17)

Thank Dwayne for your posts.
To resume, I use Access macro to make an inventory of our Universes.
(tables, connection, universe info…)
For Universe info ok but for corresponding tables… :hb:


Set Univs = oInfoStore.query(“SELECT * FROM CI_APPOBJECTS WHERE SI_KIND=‘universe’”)

    ' Iterates through all universes
    For i = 1 To Univs.Count
        
        Debug.Print Univs.Item(i).Id
        Debug.Print Univs.Item(i).Title
        Debug.Print Univs.Item(i).FulName
        Debug.Print Univs.Item(i).LongName
        Debug.Print Univs.Item(i).parentid
        
        'retrive relative tables for this specific universe
        Set DesApp = New Designer.Application
        'Set Univ = DesApp.Universes.Open(Univs.Item(i).Title)
        'apparantly you need universe's path and not the name
        univ_name = "B:\Input\...\ellipse - accounts receivable.unv"
        Set Univ = DesApp.Universes.Open(univ_name)

    Next

Designer Message error: You are not authorized to use this document (FRM 00008) Details: the universe belong to another CMS. You cannot open it unless you are connected to the same CMS from which it was imported.

Someone can help me!?


gana3000 :fr: (BOB member since 2007-04-19)