For now it's being mostly used for support. From there you can manipulate the Data Modeler model, to do some operations in your project.
The main object is Dic
, which holds all the information about the project. For example, the following script:
var
I, J: Integer;
Fld: TGDAOField;
RequiredBefore: Boolean;
begin
for I := 0 to Dic.Tables.Count - 1 do
for J := 0 to Dic.Tables[I].Fields.Count - 1 do
begin
Fld := Dic.Tables[I].Fields[J];
if (Fld.Domain <> nil) and not Fld.InPrimaryKey then
begin
Fld.RequiredSpecific := True;
if Fld.Required = Fld.Domain.Required then
Fld.RequiredSpecific := False;
end;
end;
end;
Will add an underscore (_
) in front of all table names. Again, this is mostly for support, as modifying the project directly might have side effects. For example, for the simple script above, the user interface will not be updated, so you have to save the project, and reopen again to see the changes.