I’m using universe designer SDK to automatically update/make changes in the universe. We have about 175 copy of the same universe with some custom changes done on each universe. We have a requirement to design an application in VB6 or .NET using designer SDK to automatically update the univserses in a loop. My design at a high level is run a select against infostore, get all universes (with universe folder or Path name) and store in a file or table. Then connect to designer, open and import each universe, apply the changes, save and export back into repository… in a loop. I went thru the sggesstions made by several people in this forum, but still having difficulty in open/import universe. I have given sample of my code.
– running a query in infostore to get universe details and store in a file/table
sSQL = “”
sSQL = "SELECT "
sSQL = sSQL & " SI_NAME,SI_REVISIONNUM,SI_SHORTNAME,SI_UPDATE_TS,SI_PARENT_FOLDER,SI_OWNER,SI_PARENT_FOLDER_CUID "
sSQL = sSQL & " FROM CI_APPOBJECTS "
sSQL = sSQL & " WHERE SI_KIND=‘Universe’ "
oInfoObjects = oInfoStore.Query(sSQL)
– storing in a file
For Cnt = 1 To oInfoObjects.Count
PrintLine(1, oInfoObjects.Item(Cnt).Properties(“SI_PARENT_FOLDER_CUID”).Value & “” & oInfoObjects.Item(Cnt).Properties(“SI_NAME”).Value)
Debug.Print(oInfoObjects.Item(Cnt).Properties.Item(“SI_PARENT_FOLDER_CUID”).Value)
Debug.Print(oInfoObjects.Item(Cnt).Properties.Item(“SI_NAME”).Value)
Next Cnt
FileClose(1)
–logon to the designer
Call ObjDes.Logon(“userid”, “password”, “server name”, “Enterprise”)
I’m looping thru file and trying to open universe. The arguments for OpenFromEnterprise is universe foldername and universe name. I don’t see specific universe folder name when I run the query in infostore as 'Select * from CI_APPOBJECTS WHERE SI_KIND=‘Universe’. I need to pass foldername to OpenFromEnterprise. Please help how do i do that. OR what else I can use in place of foldername. ( SI_PARENT_FOLDER_CUID is not working as suggested in this forum) Thanks for your help in advance.
How to get/use universeFolderCUID? universeInfoObject.Title - you mean universe name?
I tried using complete foler path name on the server like “\\c$\Program Files\Business Objects\BusinessObjects Enterprise 11.5\Data<@server name>\storage\universes” only and with concatenating SI_CUID with above path like
"\\c$\Program Files\Business Objects\BusinessObjects Enterprise 11.5\Data<@server name>\storage\universes<SI_CUID>
It did not work for either.
Also, as far as parameters, the LAST one is optional [boolean], which is equivalent to “OpenFromEnterprise LOCKED?” and enforces whether the Universe should be retrieved with “lock” status on/off.
And Universe Path can be substituted w/ Universe folder CUID so you don’t have to use the messy path convention.
Now I’m wondering how you manage designer.tlb and the other api (the stuff with the InfoObject and infostore.query) together in one application. Is the other api also .COM or do you work in .NET?
I ask as I thing that krish.mahal has the same question, because he is dumping the query result to a file. This suggests that he is using a two step approach (two different api’s)…
To krish.mahal:
Can you illustrate the code that you use to parse the lines from the file?
Have you add some debug.print before and after the OpenFromEnterprise?
The above code imports the universe in the standard local path “C:\Documents and Settings<user name>\Application Data\Business Objects\Business Objects 11.5\Universes@servername”. I want to get this imported in a pre-defined path. eg: C:\Universes… how can i accomplish that.
umh…to specify a path…
I think that the method OpenFromEnterprise depend to your designer set up!
i.e. maybe, you have to modify the path into Designer: Options/Save tab
Manually or automatically… I dont know
You can try something with the SetInstallDirectory() in the Reporter SDK.
But this method is not available in the Designer SDK.
bernd
Sets the path of the directory where BusinessObjects is installed.
Definition
Sub SetInstallDirectory(DirectoryID As boDirectoryID, Path As String, Temporary As Boolean)
Syntax
var.SetInstallDirectory(DirectoryID, Path, Temporary)
var is the name of the Application variable that you declare.
DirectoryID is the directory you want to set. This can be one of the following values:
boBusObjDirectory(0)
BusinessObjects directory
boDocumentDirectory(1)
UserDocs directory
boTemplateDirectory(2)
Template directory
boUniverseDirectory(3)
Universe directory
boLocDataDirectory(5)
Local Data directory
boSharedDataDirectory(6)
Shared Data directory
boAddInsDirectory(8)
AddIns directory
Path is the new path you wish to assign to the directory variable.
Temporary is a Boolean which determines whether or not changes are lost when BusinessObjects is closed. If it is set to TRUE, then changes are only applied while BusinessObjects is running. If it is set to FALSE, changes are made permanently.
I stumbled on this thread and thought I would give another solution for the initial issue.
Assuming you know the folder you want to import from, use the following:
to get the CUID for the universe folder named “devUnis”
Dim uniApp as Designer.Application
Dim folderCUID As String
uniApp = New Designer.Application
uniApp.Visible = False
uniApp.Interactive = False
'NOTE: YOU MUST BE ON LINE (LOGGED IN) TO GET THE ROOT FOLDER
uniApp.Logon(uid, pwd, svr, secType)
folderCUID = uniApp.UniverseRootFolder.Folders.Item("devUnis").CUID