Macro - how to get the schema property for an Entity

I have a macro that gives 99% of the information I need to work through a list of entities NOT painted on a Workspace.

I need the SCHEMA so I can emit schema.entityName to the Message pane.

This doesn’t work:

Log.Information (iteratedEntity.Schema + “.” + iteratedEntity.Name);

It gives: undefined.entityName

Can someone please point me to a usable scripting reference? I have open the TDMReference.chm, but it’s full of not really usable information on “how to get a schema name for an entity…” Likewise the Toad Data Modeler Help.chm file - nothing of any use.

Here’s hoping… Thanks!

Hi,

you have two choices:

Log.Information(iteratedEntity.DBOwner.Name);

or

Log.Information(iteratedEntity.FullName);

DBOwner is property that can contain Schema, User, or Database it depended on database platform.

BTW: When you open TDMReference you can go to tab “Index” and write “PEREntity”. Now you can see all properties and method that you can call from scripting. I know that DBOwner is not intuitive name of Schema property.

Regard

Daril

FullName was exactly what I needed.

Many thanks, Daril.

You are welcome.

If you will have next questions, don’t hesitate contact us again.

Daril