Welcome to the Toad Data Modeling Community
Advanced Search - Help - Search Toad World
Welcome, Guest
Login Login / Register
Help
NEW? Get Plugged In

Forums » Join Discussions About... » Scripting and Customization

Thread: How to set Generator User Data Type OTPs

This question is answered. Helpful answers available: 2. Answered answers available: 1.


Permlink Replies: 1 - Pages: 1 - Last Post: Nov 6, 2009 1:38 AM by: moakes
moakes

Posts: 254
Registered: 11/29/07
How to set Generator User Data Type OTPs
Posted: Nov 5, 2009 8:29 AM
 
  Click to reply to this thread Reply

Hi,

I am trying to update our Generation customisation to handle User Data Types in TDM 3.4.15.10. (User Data Type now has four sub selections).
We generate separate files for each set of objects. Basically the script makes the file name, sets the required OTPs then runs the generator.
This is based on a script you supplied some time ago.

So far I have

function InitGeneratorUserDataTypes(Generator, CurrentModel)
{
  Generator.CreateNewObjectInternal(118);

  SelectOTPProperty(SelectOTPClass(
      Generator.SelectedOTP,
      Generator.Root().ClassName),
    "UserDataTypes", "Create or Replace");

  If ( CurrentModel.UserDataTypes.Count > 0 )
  {
     Udt = CurrentModel.UserDataTypes.GetObject(0);

     SelectOTPProperty(SelectOTPClass(Generator.SelectedOTP, Udt.ClassName),
       "NestedTableTypeDefinition", "");  // doesn't select Nested Table Type Definition

     SelectOTPProperty(SelectOTPClass(Generator.SelectedOTP, Udt.ClassName),
       "ObjectTypeBodyDefinition", "");  // select Object Type Body Definition

     SelectOTPProperty(SelectOTPClass(Generator.SelectedOTP, Udt.ClassName),
       "ObjectTypeSpecification", ""); // selects Object Type Specification

     SelectOTPProperty(SelectOTPClass(Generator.SelectedOTP, Udt.ClassName),
       "VarrayTypeDefinition", ""); // doesn't select Varray Type Definition

  }
}

How do I set Nested Table Type Definitions and Varray Type Definitions check boxes?

Thanks
Malcolm






moakes

Posts: 254
Registered: 11/29/07
Re: How to set Generator User Data Type OTPs
Posted: Nov 6, 2009 1:38 AM   in response to: moakes
 
  Click to reply to this thread Reply

Hi,
I've found it.

I need to use "NestedTableDefinition" and "VarrayDefinition"

Regards
Malcolm



Legend
Guru: 2001 + pts
Expert: 751 - 2000 pts
Enthusiast: 31 - 750 pts
Novice: 0 - 30 pts
Moderators
Helpful answer (5 pts)
Answered (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums