Toad World® Forums

How to set Generator User Data Type OTPs


#1

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


#2

Hi,
I’ve found it.

I need to use “NestedTableDefinition” and “VarrayDefinition”

Regards
Malcolm