Toad World® Forums

Presetting values in DDL creation dialog


#1

Hallo !

I need to preset/access some values (sql file location, settings, …) in the ddl creation dialog (before the dialog is displayed). Are there any hints how this can be done ?

Thanks, Reiner.


#2

Hi Reiner,

may I know the reason to preset the values before the dialog for DDL creation is displayed? The settings are saved alongside with the model. And you can save the particular settings as new and made them default for new models. Default Paths can be modified in Settings/Options… Please, try to be a bit more specific about the reason.
Hope it was of some help to you, get back.
Lukas


#3

Hallo Lukas !

FYI:

We have several models for different projects (i mean our software projects, not TOAD projects).

Per project we have the models for several db brands.
They all (per project, per brand) reside in different locations (not in TOADS default path for models etc.).

When we open/select the TOAD model and generate ddl script, we want to set the output file/path automatically to a specific one depending on our related project/brand (not a default path valid for all models or depending on machines installations).

Furthermore, we want to select the stored values for ddl generation, which is actually always “default system” when the dialog opens. We have defined several stored value groups, and want to preselect our default one depending again on project/brand.

Regards,
Reiner.


#4

Thanx Reiner for the comprehensive info.
I can see the only lonely way to do this to save the settings for every individual model.

Run F9 or Generate DDL script, in dialog select Location of SQL File or create new Directory and Open it, then make own selection and save it as Save as New next to Selection option and Load Selection and then Save Settings.

To Selection option:
You can Save as New and Load selection (if you want to set up a new “selection profile”) or just Save selection if you want just to change the current “selection profile”.
Of course you can make your “selection profile” Set as default for all next new models.

Let me know if this is what you are aiming.

Lukas

Message was edited by: Lukas


#5

Hallo Lukas !

Thank you for your information.
Your proposal covers (nearly) all requirments.
After setting my options as default and set a path per model, these properties are retrived automatically when the dialog opens.

One thing which can not be resolved is the fact, that those models are accessed by several people who have their own workspace (svn) for that models and so have their own paths to the model. This conflicts if the path is presetted in the model.
Therefore i’m looking for possibility, to access the dialogs properties.

Regards,
Reiner.


#6

Hi Reiner,

I’d like to show you something useful. TDM allows you to modify forms. I created a new package. In this package you will find modification of the DDL Script Generation dialog and also one really short script.

What it does: When you click the new “To Model Path” button on tab What To Generate, TDM will read the current model file path and then replace the current path to DDL file with the model path. Easy and simple.

Screenshot attached. See also messages in Log.

Note: this is only for BETA version. Earlier versions are not able to return model path.

Another note: BETA 4.0.3 contains support for subversion (we found several bugs and will release another beta relatively soon).
Movie: http://modeling.inside.quest.com/entry.jspa?externalID=4524&categoryID=273

Regards,

Vaclav

Message was edited by: vaclav


#7

Hi Reiner,

I’d like to show you something useful. TDM allows you to modify forms. I created a new package. In this package you will find modification of the DDL Script Generation dialog and also one really short script.

What it does: When you click the new “To Model Path” button on tab What To Generate, TDM will read the current model file path and then replace the current path to DDL file with the model path. Easy and simple.

Screenshot attached. See also messages in Log.

Note: this is only for BETA version. Earlier versions are not able to return model path.

Another note: BETA 4.0.3 contains support for subversion (we found several bugs and will release another beta relatively soon).
Movie: http://modeling.inside.quest.com/entry.jspa?externalID=4524&categoryID=273

Regards,

Vaclav

Message was edited by: vaclav
SetDllFilePath.zip (4.14 KB)


#8

Hi Vaclav !

Thank you for that package, it demonstrates how i can solve my requirement.
For initializing, i used the OnCreate() event to preset the path without userinteraction.

Is there more information availbale to modify form and/or modify controls ?

  • In that “FmPERgenerator” form i would like to preset a special schema (if present in the listbox). Actually i don’t know how to get the listbox index for a given text.

  • can i access the listbox labeled “Selection” and the assigned buttons like “Load Selection”, “Save Selection” ? I can’ t find the names for these objects in the form explorer.

  • can i overwrite an event script of an existing object with my own code so that base script will not be called (replacement) ? Actually my script is called and then the default is called automatically.

  • can i overwrite an event script of an object with my own code and then inside this script call directly the “base” implemenation of that script ?

Regards
Reiner


#9

Hi,

Reiner,

  1. Please find below how to change schema:

Generator.DbOwner = Generator.Model.Users.GetObject(1);
DCBSchemas.UpdateData();

Note: two users must be defined in your model. Index 1 is for second user.

  1. No. This is not accessible via scripting.

  2. and 4. What event script do you wish to overwrite, please? There are theoretically ways how to do what you want, but we terminated our own usage of this. Is the second item a stopper for you?

Regards,

Vaclav