Toad World® Forums

Use predefined selections for DDL generation

Hi,

I try to pass predefined selection as a parameter to the script without success.

I used Expert mode to create and save two different selections. Manually in TDM I can switch between them. I try to switch it via command line script, but I could not figure out where to put it.

Here is the snippet:

Generator.SelectedOTP = ‘SomePredefinedSelection’;

Generator.Generate();

These two different selections stored in C:\Users\myname\Documents\Toad Data Modeler\4.3.3\Selected OTPs\Oracle 11g Release 2.txo

There are two different Names under SelectedOTPsFolder\SelectedOTPList\SelectedOTPsOR11R2 paths. ‘SomePredefinedSelection’ is one of them.

May somebody help me?

Thanks,

Sergiy

Hi,

can you send us more information about what you wish to achieve, please? We are working on performance optimizations and some code that is used for generation of SQL will be modified.

Thanks,

Vaclav

Vaclav,

Workflow we currently have is:

  1. Create base entities like tables, indexes

  2. Load data

  3. Enforce referential integrity via FK and triggers, etc.

I have two Selections I’ve created in Expert Mode I can choose from in DDL Script Generation form. One of selections is BeforeImport that matches item 1) above, another one is AfterImport that matches item 3) above.

I can pass Selection argument to script from command line but I could not figure out how to use it in the script.

I modify command line script to generate DDL from command line by Vladka ( www.toadworld.com/.../2999.aspx ) to have 3 parameters instead of 1 parameter: ModelName, FileToGenerate, Selection.

So far, I can pass parameters into script successfully:

TDM.exe Open-File -File:Name=“C:\Data Model\DataModel.txp” Execute-Script -Parameter ScriptName=CMD,MethodName=RunGeneration,Par1Name=DataModel,Par2Name=“C:\Data Model\BeforeImportScript.sql”,Par3Name=BeforeImport -TDM

TDM.exe Open-File -File:Name=“C:\Data Model\DataModel.txp” Execute-Script -Parameter ScriptName=CMD,MethodName=RunGeneration,Par1Name=DataModel,Par2Name=“C:\Data Model\AfterImportScript.sql”,Par3Name=AfterImport -TDM

Thanks,

Sergiy

Vaclav,

Is there any possibility to pass Selection parameter to command line script generation?

Thanks,

Sergiy