BusinessObjects Board

Mass Updating object descriptions in universe

I was wondering how do I have the objects put in the right classes.

say I have 3000 objects new in new classes that haven’t been defined yet.

If I have them in the spreadsheet, that would really help me do my job of designing a universe OR at least the busy work part of it…

This tool nevertheless is very helpful and has been fine for a basic way to update your info.

I like it regardless of whatever one else thinks.

I had cutting and pasting even 100 objects and descriptions in from scratch…!

Thanks Dwayne. It saved me about 2-3 days…of time.


BusObjGuy :us: (BOB member since 2002-10-17)

You’re quite welcome. The utility is rather bare bones though, and doesn’t have a “move” function, or any ability to create new objects. It could be done … kinda. The “move” would have to be an add / delete, and that would mess up any existing reports … I think.


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

I know I’d have to make some changes to this but is this possible in XIR2? Or has the object model changed too much to allow this?


chris_c :us: (BOB member since 2006-01-10)

Aswered my own question. Change the reference to 11.5 designer then change the lines where .logonAs is used so they say .LogonDialog


chris_c :us: (BOB member since 2006-01-10)

I have also put a copy of the updated macros in the bob upload area so hopefully it will be accepted and put into Bob downloads.

regards,

Mark


robbinma4 :uk: (BOB member since 2005-07-31)

Yes, Michael moved it to Bob’s Downloads here.

So, I removed your duplicate post and attachment which was in this topic. :wink:


Bobarella (BOB member since 2004-02-12)

This is great!! It worked for BO XI R1. All I had to change was - In VB -> Tools -> References, remove MISSING BO Designer 5.x Object Library and check the box for Business Objects Designer 11.0 Object Library. And as suggested replace .loginAs with .LoginDialog at two places; save the changes.

Here is the sequence that I had to follow

  1. Open the Designer, sign in
  2. Run GetInfo macro. It prompts you to login again.
  3. Opens a dialog box to select/open .unv file; it then opens selected universe and populates the excel with object names
  4. For testing, you may want to copy the object names into description and save the excel
  5. If Designer is closed; relaunch and sign-in
  6. Run MakeChanges macro from Excel
  7. Designer login dialog prompts you to sign-in and select/open the .unv
  8. It makes changes to description and asks whether you want to save he changes - say yes.

Thanks a lot Dwayne.


pritish (BOB member since 2005-11-22)

You’re quite welcome :yesnod: !!!


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

Hi,

I’m running BO XI R1… tried the code with the minor adjustments suggested yet I get a run time error ‘30’ basically highlighting ‘DesignerApp.Visible = True’

anyone has an idea as to why this might be?

Thanks in advance


David_Dadoun :canada: (BOB member since 2006-04-21)

Hi All / Dwayne

I am using XI Rel2 . I tried to use the excel workbook to mass update the object descriptions. Even though it is working on one of our machines which has BO 6.5 , it is not working on the machine where we have BO XI Rel2.
I have changed the following : Removed MISSING BO Designer 5.x Object Library and check the box for Business Objects Designer 11.5 Object Library

It throws an error when i try to run the macro: “The LoginAs method has been deprecated. Please use one of the new login methods”.

Any suggestions ? Attached is the download for you reference.

Sanjit

Got the answer of my own question : change Call DesignerApp.Login to
Call DesignerApp.LogonDialog

Sanjit
Universe - Object Names & Descriptions.xls (32.0 KB)


Sanjit (BOB member since 2004-04-05)

Hi,

It looks like BO have changed the login method. :o
According to the dev library (http://devlibrary.businessobjects.com/BusinessObjectsXIR2/en/en/BO_SDK/dessdk_com_doc/default.htm) the new command should be:
DesignerApp.LogonDialog

which means that you need to change the macro in your version. Replace all lines where it says DesignerApp.Login with DesignerApp.LogonDialog

I don’t have XI R2 but according to the docs that should be all that is required. :frowning:

There is a later version of the macro here which has more functionality:

I have patched my version and will submit it to BOB Uploads today to replace my updated version. for the moment I have attached a copy but the latest version will always be avaiable via BOB downloads.

Best Regards,
Mark
Universe - Object Names & Descriptions.zip (13.0 KB)


robbinma4 :uk: (BOB member since 2005-07-31)

Hi

In response to

I am also using XI release 1 and had the same problem.
I just commented out the line

'DesignerApp.Visible = True

And it works fine.
(Thanks Dwayne! :slight_smile: )

Nicolas


mob43059 (BOB member since 2005-11-10)

This is a great utility, but have anybody’s clients raised concerns about security issues of using macros on one of their servers? Is there any clever way to restrict people from ever editing the existing macros or creating new ones? What are some ways, other than just password-protecting the worksheet, that security can be increased without limiting the functionality of this utility? Thanks.


AxisGp (BOB member since 2006-03-21)

I use the tool internally so I don’t have clients but there are several things to remember:
I don’t think it is possible to prevent people from using macros outside of BO like this one. The problem is that the object model is open to any application that can use VBA. If you want to restrict people from using Excel then I think MS Office has controls to say that people can’t write macros.
I suspect that someone could manipulate the object model using Windows Shell Script if they wanted to. :roll_eyes:

The utility requires someone to have access to Designer rather than an ordinary Reporting account. If you trust people to use Designer then you are implicitly saying that you trust them to change the universe. This utility doesn’t allow changes that you can’t make through the front-end it just allows you to make them a lot quicker. :slight_smile:

The macro itself only works on the client PC. The user still needs to export the universe to the live environment. In my company only the BO administrators are allowed to put the universes live so there is an extra level of checks.

Macros in reports can be controlled using Supervisor but I don’t think that is what you meant.


robbinma4 :uk: (BOB member since 2005-07-31)

Thanks for the response.

I think what we may end up doing is importing the universe to my computer, which has a local BO install (I normally work on their servers’ installs), update the definitions on my laptop, and export them back to the client’s development server. Kind of a pre-development environment.

…and nobody that uses my laptop is smart enough to hack the macros in the ways you described. :wink:


AxisGp (BOB member since 2006-03-21)

Sounds like a good solution to me.


robbinma4 :uk: (BOB member since 2005-07-31)

Hello All,

I just wrote this macro to import universe, do LOV refresh, export universe. But i am firing that through an Excel sheet. Could any one help me to trigger this code on server (remote machine) with just one click.

Thanks

Sub DoLOVRefresh()

    Dim RowNum As Long
    Dim RowNum1 As Long
    Dim Cls As Designer.Class
    Dim Obj As Designer.Object
       

    Set DesignerApp = New Designer.Application
    DesignerApp.Visible = True
    Call DesignerApp.LoginAs
   Call DesignerApp.Universes.Import("DomainName", "UniverseName")
   MsgBox ("Imported Universe Successfully")
       
    Set Univ = DesignerApp.Universes.Open    
   
    For RowNum = 1 To Univ.Classes.Count
        Set Cls = Univ.Classes.Item(RowNum)
        For RowNum1 = 1 To Cls.Objects.Count
        	   Set Obj = Cls.Objects.Item(RowNum1)
         	   If Obj.HasListOfValues = True Then
           		If Obj.ExportLovWithUniverse = True Then
            			Obj.ListOfValues.Refresh
			MsgBox ("Done LOV Refresh for " & Obj.Name)
		End If
	End If
      Next RowNum1
Next RowNum
                
MsgBox ("Completed LOV Refresh for All Objects")
    
Univ.Save
Univ.Close
    
Call DesignerApp.Universes.Export("DomainName", "Groups", "UniverseName")
            
DesignerApp.Quit
Set DesignerApp = Nothing
    
End Sub

[Moderator Edit: Added code formatting.]


laxmi_soujanya (BOB member since 2006-06-21)

I’m not sure I understand your question.
Are asking how to add a button/command to Excel to automatically start the macro or start it when the macro is loaded? If so then have a look at the Excel VBA and using a Command Button to run the maco or use an AutoOpen (not a recommended solution :nonod: ) to do it.

In its most basic form->Drop a command box on the excel sheet. Change the properties and add something like the following code:
Private Sub GetInfoBut_Click()
DoLOVRefresh
End Sub

N.B. you would need to add extra error handling. :slight_smile:

BTW you are likely to get more replies if you put this in a seperate post rather than reply to this one as people will read this one for details about updating the universe en-mass.


robbinma4 :uk: (BOB member since 2005-07-31)

I’ve actually modified it a bit also, I have Select, Where, Name and Desc. that is updateable. I’ve attached the file along w/this mesg. This is for BO XI R2 version.
Thanks,
Namita
Object Names & Select and Where and Desc.xls (32.0 KB)
Object Names & Select and Where and Desc.xls (32.0 KB)


vatrbaby (BOB member since 2004-11-03)

HI Namita/Bob,

is there any way we can change this macro to add this functionality.

Compare Current Select and Current Object Name to another excel file assume the name of the file is (“METADATA”) and

If the current select is matching to the select column in METADATA sheet but CURRENT Object Name is not matching …update the object name by adding it to the NEW OBJECT NAME

Pleaseeeeeeeeeeeeeeeeeee !!! help I have not done any macro work yet :(((

NASIR


botakhan :pakistan: (BOB member since 2005-08-18)