BusinessObjects Board

Mass Updating object descriptions in universe

When you update a select statement through Designer (manually), the Tables… change accordingly. As you’ve discovered, that’s not the case through the SDK. You have to update it yourself in a separate step. Also note that there can be more than one table associated with an object.


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

Hi,

I had the same problem as BMTS. As mentioned by Dwayne I solved it using this code:


            On Error Resume Next
            For tblitemcnt = 0 To obj.Tables.Count
                obj.Tables(1).Delete
            Next
            On Error GoTo 0
            obj.Tables.Add class.Name

obj is the actual object and class name is the table used in the select statement for the object, so you need to change this accoding to your needs (assuming your class names are not the table names as they are in my development universe…:wink:
The on error statment was used for quick and dirty… :smiley:

Have fun,

Gerard


highandstoned :netherlands: (BOB member since 2005-08-01)

Dwayne, nice script! I have found this very helpful. But I have a few questions:

How is it that I can open a derived universe using this script and modify object names/descriptions of a core universe? Is this a hole in the SDK? I believe in Designer, the classes and objects from the core universes are greyed out so you can’t modify them (but you can with this script!). Is there a way to tell which classes/objects are from the core universes and which are native only to the derived universe?

Additionally, where can I find a list of hidden properties (like Id) as mentioned by you in this message?

Thanks in advance


RufusLancaster :us: (BOB member since 2005-11-02)

I haven’t confirmed this, but if you can edit linked items with the SDK, I’d say it is a bug. I wonder what happens when a core universe changes. I’m guessing the “SDK modifications” would be lost.

To my knowledge, no. The lack of answer to your other post asking the same thing would be pretty good confirmation of that fact.

In the Object Browser, right-click and select “Show hidden members.”


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

You are correct. Although you can use that script to make name/description changes to core universe objects inside a linked universe, these changes won’t remain if the core universe changes. In fact if you export the linked universe (with the changes) to the repository and then re-import it, the changes are gone as well. I would still agree it’s a bug in the SDK.

Sigh…I was afraid of that.

Great, thank you. And again thanks for the script.


RufusLancaster :us: (BOB member since 2005-11-02)

If I run this script and make changes to an object name and description I can save the universe and export it to the repository and the change exists just fine. If I now create new reports based off of this universe I can see the changed object name and description.

However, I seem to be having trouble getting these object changes to show up in existing reports. Is there something I have to do to get these changes to propagate to existing reports?

Thanks in advance.


RufusLancaster :us: (BOB member since 2005-11-02)

There’s a counter that gets incremented when you export a universe – that then gets detected, and forces a download of the refreshed universe on a given workstation.

If you modify the universe in the way you did it – that counter doesn’t get incremented.

So – try reimporting the universe in Designer, and then re-export it. Maybe even re-export it twice. Exporting twice will circumvent some logic that looks for changes, and really forces a complete re-import of the universe when everyone next uses it.


Anita Craig :us: (BOB member since 2002-06-17)

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)