Reporting Entities used in Workspaces

Is there an easy (or hard) way to report the entites used in the Workspaces. I would like to be able to audit my work spaces to make sure that every table in my database is in at least one Workspace.

Thanks In Advance,

Paul

Hi Paul,

I created custom package with small macro that does what you need. Download the package from the following location:

www.toadworld.com/…/1357.aspx

Good luck,

Vaclav

Thanks – that is exactly what I needed. I really need to learn to use the Data Modeler macro language. It looks like it is very powerfull.

From: Vaclav Frolik [mailto:bounce-Vaclav_Frolik@toadworld.com]

Sent: Saturday, December 28, 2013 3:56 PM

To: tdm@toadworld.com

Subject: RE: [Toad Data Modeler - Discussion Forum] Reporting Entities used in Workspaces

RE: Reporting Entities used in Workspaces

Reply by Vaclav Frolik

Hi Paul,

I created custom package with small macro that does what you need. Download the package from the following location:

www.toadworld.com/…/1357.aspx

Good luck,

Vaclav

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad Data Modeler - General
notifications altogether.

Toad Data Modeler - Discussion Forum

Flag
this post as spam/abuse.

Paul Crompton

Senior Architect, Conversion

P: 972.713.3770 ext: 113655

I am glad you got what you needed. And yes, scripting is powerfull - and can be used not only for modifications of model objects, but also for adding new features to the product, incl. some basic reporting features etc.

Is there a link or white paper on the commands that can be used in the Marcos?

From: Vaclav Frolik [mailto:bounce-Vaclav_Frolik@toadworld.com]

Sent: Thursday, January 02, 2014 2:54 AM

To: tdm@toadworld.com

Subject: RE: [Toad Data Modeler - Discussion Forum] Reporting Entities used in Workspaces

RE: Reporting Entities used in Workspaces

Reply by Vaclav Frolik

I am glad you got what you needed. And yes, scripting is powerfull - and can be used not only for modifications of model objects, but also for adding new features to the product, incl. some
basic reporting features etc.

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad Data Modeler - General
notifications altogether.

Toad Data Modeler - Discussion Forum

Flag
this post as spam/abuse.

Paul Crompton

Senior Architect, Conversion

P: 972.713.3770 ext: 113655

Hi,

yes. Click Settings | Options and in section General enable check box Expert Mode. Then click the newly visible Expert Mode menu and choose Reference Guide. CHM file with a list of objects, properties and functions opens.

More information about scripting can be found in documentation, in section Project and Models -> Scripting and Customization. Plus many articles published in TDM blog are about customization.

Good luck,

Vaclav

The URL is no longer resolving...

The macro Vaclav shared is so essential, could it please be re-published, as, on a new PC, the package is no longer available to me, and I modified it to show Entities NOT on a WS, so that I can review the new tables and place just those...

It would be GREAT if that Macro could be a standard-issue function........

This is the recovered macro, in case anyone else may find it useful.

CAVEAT - Assumes that:

  1. A user-defined Workspace is present in the Model.
  2. The default "All Items" Workspace has been DELETED.
  3. Model ==> Update does not automatically add all entities to the first workspace.
  4. You CLEAR the Message Explorer of all messages.
function Main(){
  var App = System.GetInterface("Application");
  var Model = App.ActiveModel;
  var WS = App.ActiveWorkSpace;
  var Log = System.CreateObject("Log");
  if(Model==null) return;
  
  var i, a, e, iteratedWS, iteratedEntity, shapeOnWs, entityShapesCount;
  for(i=0; i<Model.Entities.Count;i++)
  {
    entityShapesCount = 0;
    iteratedEntity = Model.Entities.GetObject(i);
  
    for(a=0; a<Model.WorkSpaces.Count;a++)
    {
      iteratedWS = Model.WorkSpaces.GetObject(a);
  
      for(e=0; e<iteratedWS.ShapeList.Count;e++)
      {
        shapeOnWs = iteratedWS.ShapeList.GetObject(e);
        if(shapeOnWs.ParentBaseID == iteratedEntity.ID)
        {
        entityShapesCount++;
        }
      }
    }
    if (entityShapesCount == 0)
    {
    Log.Information (iteratedEntity.FullName);
    }
  }
}

Hi everyone,

I am trying to run the script but it is exiting on the model validation:

if(Model==null)

My model has 3 workspaces

Do I have to set the model as active ?