Ax provides a lot of reflection classes to get metadata information. A colleague just needs a list of ax data dictionaries and writes one easily. There is no technical content. Here we will back up the data, so that you can copy and paste it later. Static Void Datadictionary (ARGs _ ARGs)
{
# AOT
# Define . Filename (@ "D: \ datadictionary.txt ")
Textbuffer TB = New Textbuffer ();
Treenode = Treenode: findnode (# tablespath );
Dicttable;
Dictfield;
Int I;
;
Treenode = Treenode. aotfirstchild ();
While (Treenode)
{
Dicttable = New Dicttable (tablename2id (treenode. aotname ()));
TB. appendtext (dicttable. Name () + ' ' + Dicttable. Label ());
TB. appendtext ( ' \ N ' );
For (I = 1 ; I <= Dicttable. fieldcnt (); I ++ )
{
Dictfield = New Dictfield (dicttable. ID (), dicttable. fieldcnt2id (I ));
TB. appendtext ( ' ' + Dictfield. Name () + ' ' + Dictfield. Label ());
TB. appendtext ( ' \ N ' );
}
Print treenode. aotname ();
Treenode = Treenode. aotnextsibling ();
}
TB. tofile (# filename );
}
You can also use dictionary to get the table instead of treenode. Static Void Datadictionary2 (ARGs _ ARGs)
{
# AOT
# Define . Filename (@ "D: \ datadictionary.txt ")
Textbuffer TB = New Textbuffer ();
Dictionary dictionary = New Dictionary ();
Dicttable;
Dictfield;
Int I;
Int J;
;
For (I = 1 ; I <= Dictionary. tablecnt (); I ++ )
{
Dicttable = New Dicttable (dictionary. tablecnt2id (I ));
TB. appendtext (dicttable. Name () + ' ' + Dicttable. Label ());
TB. appendtext ( ' \ N ' );
For (J = 1 ; J <= Dicttable. fieldcnt (); j ++ )
{
Dictfield = New Dictfield (dicttable. ID (), dicttable. fieldcnt2id (j ));
TB. appendtext ( ' ' + Dictfield. Name () + ' ' + Dictfield. Label ());
TB. appendtext ( ' \ N ' );
}
Print dicttable. Name ();
// Treenode = treenode. aotnextsibling ();
}
TB. tofile (# filename );
}