I am trying to find the Class to which the object belongs? The RootClass function returns the name of the root class. How can i get the name of the immediate Class and not the root class?
If this Question has already been answered in this huge thread can u please guide me to that post.
Not sure I follow the question exactly. The .RootClass property returns the “parent” class of the given object. If you are looking for all of the intervening classes above it (the class “folder” structure), I can see two choices. First, you “sort of” have this information on the Classes tab of the utility. Second, you could tweak the code to successively concatenate a string with the “trail” of classes … say, inserting a “/” between each level.
It doesn’t make sense, in my opinion, to do everything at once. If you wanted to, I am sure you could put a “wrapper” loop around the base code provided in the utility and loop through all of the universes. You would need to figure out how to store the information.
I considered including that feature in the utility, but came to the same conclusion as Dave. It just didn’t make sense to me. Most users of the information would immediately put in a filter to look at one universe at a time. That said, if you wanted to document all universes stored locally, you could adapt the “recursion” technique shown in this utility, and apply it to *.unv files.
Dwaine, this is an absolutely fantastic utility - ive been using it for quite a while now and its saved me significant abouts of time.
I have been trying to modify some of the code slightly with limited success. I basically want to change the Table Name(s) column on the Objects tab, so that rather than a list of the distinct tables used in each object, it displays a distinct list of the table names & column names… (ie - tbale1.column1, table 1.column2, table2.column1 etc)
We have a number of complicated objects in one of our Universes with multiple table/column references (decodes/case etc).
The code is:
For Each Tbl In Obj.Tables
Rng(RowNum, 7) = Rng(RowNum, 7) & Tbl.Name & ", "
Next Tbl
'… but remove the trailing comma
If Obj.Tables.Count > 0 Then
Rng(RowNum, 7) = Left(Rng(RowNum, 7), Len(Rng(RowNum, 7)) - 2)
End If
I have tried modifying it, including ‘Dim Col As Designer.Column’ at the start - but I keep getting compiler/compatability error’s.
Do you think this is possible, and (if so), would you be able to point me in the right direction please??
Moderator Note: Ghost72, Please do not cross-post. It leads to fragmented discussions and is against our forum rules. Continue here. Thanks for your cooperation.
I get an “automation error” (try to translate message box fom german) :(.
It looks like counter overflow, something about -2147417851 (max. integer in VBA?)
The macro just fills the corresponding excel pages with full list of tables, columns, joins, contextes. And conditions too. But the list of obects is not complete, some classes are missing. It seems that the macro interrupted somewhere in the loop for getting objects properties.
Any idea how to workaround this? Maybe the universe is not ok? What happens if some object doesn’t have a valid definition, i.e. wrong table name in select? Could it lead to such error?
I’ve got this error with Excel 2002 and 2003. WebI is 3.1, local installation of Designer and SDK is v12.
At the top of this page there are several search links, one of which is “search this topic.” I used that to come up with a number of prior posts that already discuss your question, including this one that might help. Thanks.