BOB: Business Objects Board
Not endorsed by or affiliated with SAP

Register | Login 

Sunset Ride 
Sunset Ride 

General Notice: BOB is going to retire...please see details here. All BOB forums have been converted to "read only" as of September 1st.
General Notice: No events within the next 45 days.

Mass update to object names / descriptions
4 members found this topic helpful
Goto page 1, 2, 3, 4  Next
 
Search this topic... | Search BOB's Downloads... | Search Box
Register or Login to Post    Forum Index -> BOB's Downloads  Previous TopicPrint TopicNext Topic
Author Message
BOB Downloads
Download Manager
Download Manager



Joined: 05 May 2003

Posts: 40



PostPosted: Wed May 14, 2003 8:28 pm 
Post subject: Mass update to object names / descriptions

Update 23-Oct-2009: Another version that can change CLASS names and descriptions can be found here later in this thread.

Author: Dwayne Hoffpauir, EDS Corporation

Further discussion on this utility should take place in this topic.

Author Notes:
Quote:
This utility provides a high volume method for changing object names and descriptions in a universe, without writing directly to the repository. It uses Excel as the VBA host and data entry tool, and makes the appropriate calls to the Designer application. The complete utility can be downloaded from the link above.

Usage is as follows: Open the Excel workbook, press Alt-F8 and you should see two macros. Run GetInfo first. You will be asked to log into Designer, and open a universe. The GetInfo macro "dumps" the current class name, object name, and description in columns A,B,C and repeats the object name and description in columns D,E. Make changes to the columns D,E (in blue). Then run the MakeChanges macro. You will again be asked to log into Designer and open a universe. Designer will be left open with the updated universe UNSAVED, to give you a chance to review the updates.

I usually send the workbook to my subject matter experts to key the updates. Since I'm the only one that uses the macros, there is very little "bullet-proofing" of any sort, but hopefully you will find it useful.

A copy of the code is below. If you choose to copy the code into your own workbook, you will need to create a reference to the Designer Object Library first (Tools, References from the VB Editor).


Code:
Option Explicit                 'require variables to be declared before being used
Dim DesignerApp As Designer.Application
Dim Univ As Designer.Universe
Dim Wksht As Excel.Worksheet

Sub GetInfo()

    Set DesignerApp = New Designer.Application
    DesignerApp.Visible = True
    Call DesignerApp.LoginAs
    Set Univ = DesignerApp.Universes.Open
    DesignerApp.Visible = False

    Set Wksht = ThisWorkbook.Worksheets("Objects")
    Wksht.Unprotect
    Range("Objects").ClearContents
    Call GetObjectInfo(Univ.Classes, 1)
    Range("Objects").Resize(Wksht.UsedRange.Rows.Count - 1, 5).Name = "Objects"
    Range("Objects").Columns("D:E").Value = Range("Objects").Columns("B:C").Value
    Wksht.Protect

    DesignerApp.Quit
    Set DesignerApp = Nothing

End Sub

Sub MakeChanges()

    Dim RowNum As Long
    Dim Cls As Designer.Class
    Dim Obj As Designer.Object
    Dim Rng As Excel.Range

    Set DesignerApp = New Designer.Application
    DesignerApp.Visible = True
    Call DesignerApp.LoginAs
    Set Univ = DesignerApp.Universes.Open
    Set Wksht = ThisWorkbook.Worksheets("Objects")
    Set Rng = Wksht.Range("Objects")

    For RowNum = 1 To Rng.Rows.Count
        Set Cls = Univ.Classes.FindClass(Rng.Cells(RowNum, 1).Value)
        Set Obj = Cls.Objects(Rng.Cells(RowNum, 2).Value)
        If Obj.Name <> Rng.Cells(RowNum, 4) Then Obj.Name = Rng.Cells(RowNum, 4)
        Obj.Description = Rng.Cells(RowNum, 5)
    Next RowNum

End Sub

Private Sub GetObjectInfo(Clss, RowNum As Long)
    Dim Cls As Designer.Class
    Dim Obj As Designer.Object
    For Each Cls In Clss
        For Each Obj In Cls.Objects
            RowNum = RowNum + 1
            Wksht.Cells(RowNum, 1) = Cls.Name
            Wksht.Cells(RowNum, 2) = Obj.Name
            Wksht.Cells(RowNum, 3) = Obj.Description
        Next Obj
        If Cls.Classes.Count > 0 Then
            Call GetObjectInfo(Cls.Classes, RowNum)
        End If
    Next Cls
End Sub



UniverseDescriptions.zip
 Description:
See author notes above.

Download
 Filename:  UniverseDescriptions.zip
 Filesize:  11.38 KB
 Downloaded:  6251 Time(s)

Back to top
Dwayne Hoffpauir
Forum Groupie
Forum Groupie



Joined: 19 Sep 2002
ASUG Icon
medal_gold.gif*2speaker.gif*5medal_bronze.gif
Posts: 8641
Location: Plano, TX USA


flag
PostPosted: Tue Apr 25, 2006 9:16 am 
Post subject: Re: Mass update to object names / descriptions

Adding a version of the utility for Designer XI. I've only tested it with XIr2, so I'm not sure if it will work with XIr1. The only changes are to point to the XI library (Tools, References), and to reflect the syntax change for the logon dialog (.LogonDialog instead of .LoginAs).


UniverseDescriptionsXI.zip
 Description:
Version of mass update utility for Designer XI.

Download
 Filename:  UniverseDescriptionsXI.zip
 Filesize:  10.64 KB
 Downloaded:  5430 Time(s)


_________________
Dwayne Hoffpauir
Image link
Back to top
interactive
Senior Member
Senior Member



Joined: 28 Apr 2005

Posts: 88
Location: USA


flag
PostPosted: Wed Oct 22, 2008 1:13 pm 
Post subject: Re: Mass update to object names / descriptions

Dwayne,

This is great. I am trying to modify it, to include the SELECT part from Designer too and it keeps throwing up a "Out of Memory" error. I am using this in XIR3. If the code is tun without any changes then it executes perfectly fine, but when i make the change to include the SELECT it throws up the error.
The changes I made were as follows:
Sub GetInfo()
Range("Objects").Resize(Wksht.UsedRange.Rows.Count - 1, 7).Name = "Objects"
Range("Objects").Columns("E:G").Value = Range("Objects").Columns("B: D").Value
-------------------------------------------------------------------------------------
Sub MakeChanges()
If Obj.Name <> Rng.Cells(RowNum, 5) Then Obj.Name = Rng.Cells(RowNum, 5)
Obj.Description = Rng.Cells(RowNum, 6)
Obj.Select = Rng.Cells(RowNum, 7)
-------------------------------------------------------------------------------------
Private Sub GetObjectInfo(Clss, RowNum As Long)
Wksht.Cells(RowNum, 4) = Obj.Select

I would really appreciate if you can let em know where I am erring. Also, it does not return the full list of objects too. I mean, I have close to 290 objects in the Universe and the changed code stops at row 171 ( the original code returns all 290 objects though)
Back to top
Dwayne Hoffpauir
Forum Groupie
Forum Groupie



Joined: 19 Sep 2002
ASUG Icon
medal_gold.gif*2speaker.gif*5medal_bronze.gif
Posts: 8641
Location: Plano, TX USA


flag
PostPosted: Thu Oct 23, 2008 10:47 am 
Post subject: Re: Mass update to object names / descriptions

I've seen that "out of memory" error reported when the length of the string is > 1024 characters. Try this, and see if the error goes away ...
Code:
Left(Obj.Select, 1024) = Rng.Cells(RowNum, 7)

Then change it to 1025, and see if the error returns. I don't have a solution (other than adding a loop to split into "chunks" of 1024 per cell), but at least that will point out the Excel limitation causing the problem.

_________________
Dwayne Hoffpauir
Image link
Back to top
interactive
Senior Member
Senior Member



Joined: 28 Apr 2005

Posts: 88
Location: USA


flag
PostPosted: Mon Oct 27, 2008 9:38 am 
Post subject: Re: Mass update to object names / descriptions

Dwayne,

Sorry for the late response. I tried doing what you asked me to, but that stil did not help. I also tried to look at the length of the string for each object (Select) in the Universe and the max length that a few objects have are 623 charecters. This is a whole lot less that the 1024 that I was trying to put as a restraint.
Back to top
nik96159
Principal Member
Principal Member



Joined: 18 Nov 2008

Posts: 138


flag
PostPosted: Thu Mar 19, 2009 2:47 am 
Post subject: Re: Mass update to object names / descriptions

i tried to run this tool on my system

but got this error
Runtime error '430' class does not support Automation or does not support expected interface

the error is shown in this line of the code mentioned above in post
Quote:
Set DesignerApp = New Designer.Application


this may bcoz i have excel 2007 installed on my system

I am working on BO 6.5
Back to top
Dwayne Hoffpauir
Forum Groupie
Forum Groupie



Joined: 19 Sep 2002
ASUG Icon
medal_gold.gif*2speaker.gif*5medal_bronze.gif
Posts: 8641
Location: Plano, TX USA


flag
PostPosted: Thu Mar 19, 2009 10:14 am 
Post subject: Re: Mass update to object names / descriptions

nik96159 wrote:
this may bcoz i have excel 2007 installed on my system

I believe that is the case. I get the same message, and haven't had time to research it.

_________________
Dwayne Hoffpauir
Image link
Back to top
Dave Sharon
Senior Member
Senior Member



Joined: 02 Jun 2004

Posts: 60
Location: California



PostPosted: Mon Apr 06, 2009 12:49 pm 
Post subject: Re: Mass update to object names / descriptions

Is there a way to get information from the Source Information tab (like Technical Information, Mapping, Lineage) on Objects Properites window?
_________________
David Sharon Thullimelli
Back to top
nik96159
Principal Member
Principal Member



Joined: 18 Nov 2008

Posts: 138


flag
PostPosted: Tue Apr 07, 2009 1:01 am 
Post subject: Re: Mass update to object names / descriptions

hi dave,

were u able to run this tool on your system........as i think this tool is only compatible with excel 2003 not 2007
Back to top
Dwayne Hoffpauir
Forum Groupie
Forum Groupie



Joined: 19 Sep 2002
ASUG Icon
medal_gold.gif*2speaker.gif*5medal_bronze.gif
Posts: 8641
Location: Plano, TX USA


flag
PostPosted: Tue Apr 07, 2009 9:12 am 
Post subject: Re: Mass update to object names / descriptions

nik96159 wrote:
...as i think this tool is only compatible with excel 2003 not 2007

It should work with Excel 2007 as well ... at least according to tech support. It's not working on my workstation with Excel 2007, but it's probably something to do with my machine.

_________________
Dwayne Hoffpauir
Image link
Back to top
Dwayne Hoffpauir
Forum Groupie
Forum Groupie



Joined: 19 Sep 2002
ASUG Icon
medal_gold.gif*2speaker.gif*5medal_bronze.gif
Posts: 8641
Location: Plano, TX USA


flag
PostPosted: Tue Apr 07, 2009 9:16 am 
Post subject: Re: Mass update to object names / descriptions

Dave Sharon wrote:
Is there a way to get information from the Source Information tab (like Technical Information, Mapping, Lineage) on Objects Properites window?

It does not appear those properties have been added to the object model icon_cry.gif .

_________________
Dwayne Hoffpauir
Image link
Back to top
siddhr007
Senior Member
Senior Member



Joined: 14 May 2009

Posts: 92



PostPosted: Wed Jun 10, 2009 1:45 am 
Post subject: Re: Mass update to object names / descriptions

@interactive

I saw up in the post that you have been trying to get the Select part also to be updated in the tool.

I just wanted to know if there is any possible way I can apply a mass RTRIM on all the character objects in my Universe to remove blank space.


TIA

Regards
Sid
Back to top
Andreas_Seiler
Forum Member
Forum Member



Joined: 13 May 2009

Posts: 8



PostPosted: Mon Jun 22, 2009 8:54 am 
Post subject: Re: Mass update to object names / descriptions

Hi Dwayne,

Quote:
It should work with Excel 2007 as well ... at least according to tech support. It's not working on my workstation with Excel 2007, but it's probably something to do with my machine.


did you find any solution for that problem? Im working at a customers company and they restricted access to a lot of things ... i get the runtime error 430 as well, with Excel 2007. Any idea what i can try?

Im working with BO XIR2.

Thanks in advance,
Andi
Back to top
nik96159
Principal Member
Principal Member



Joined: 18 Nov 2008

Posts: 138


flag
PostPosted: Tue Jul 07, 2009 4:24 am 
Post subject: Re: Mass update to object names / descriptions

same here i am still not able to use this tool with 2007
Back to top
Dwayne Hoffpauir
Forum Groupie
Forum Groupie



Joined: 19 Sep 2002
ASUG Icon
medal_gold.gif*2speaker.gif*5medal_bronze.gif
Posts: 8641
Location: Plano, TX USA


flag
PostPosted: Fri Jul 10, 2009 11:07 am 
Post subject: Re: Mass update to object names / descriptions

Andreas_Seiler wrote:
did you find any solution for that problem? Im working at a customers company and they restricted access to a lot of things ... i get the runtime error 430 as well, with Excel 2007. Any idea what i can try?

I did find a solution ... got a new computer icon_cool.gif !!!! Kidding of course. I have no idea exactly what was causing the issue. All I know is that it works flawlessly now with Vista / Excel 2007. If you log a tech support case (or whatever they are called now), they can provide you with a "logging" utility that may help them debug your issue.

_________________
Dwayne Hoffpauir
Image link
Back to top
Display posts from previous:   
Register or Login to Post    Forum Index -> BOB's Downloads  Previous TopicPrint TopicNext Topic
Page 1 of 4 All times are GMT - 5 Hours
Goto page 1, 2, 3, 4  Next
 
Jump to:  

Index | About | FAQ | RAG | Privacy | Search |  Register |  Login 

Not endorsed by or affiliated with SAP
Powered by phpBB © phpBB Group
Generated in 0.1017 seconds using 19 queries. (SQL 0.0049 Parse 0.0674 Other 0.0294)
CCBot/2.0 (https://commoncrawl.org/faq/)
Hosted by ForumTopics.com | Terms of Service
phpBB Customizations by the phpBBDoctor.com
Shameless plug for MomentsOfLight.com Moments of Light Logo