In order for me to create my own macros, I would need reference materials that provide the detailed documentation for the underlying object model used by TDM. For example, if you look at the following code copied from one of the standard Productivity Pack macros included with TDM, it may be clearer what I'm looking for:
var Entity, i, Key, Attribute, selectedDataType, objectsToIterate, finalAttName, finalAttCaption;
if (! IsAllParametersFilled()) return;
if ((SelectedObjects == null) || (SelectedObjects.Count == 0))
{
if (System.ShowMessageDialog(1004,'WarningDialog','No entity was selected. Do you wish to add this attribute to all entities?',3, 3) == 6)
{
objectsToIterate = Model.Entities;
}
else
{
return;
}
}
else
{
objectsToIterate = SelectedObjects;
}
for (i = 0; i < objectsToIterate.Count; i++) {
SelectedObject = objectsToIterate.GetObject(i);
if (SelectedObject.ObjectType == 2502) // entity shape selected on WorkSpace
{
Entity = SelectedObject.ParentBase;
} else if (SelectedObject.ObjectType == 2002) // entity selected in Model Explorer or Object Viewer
{
Entity = SelectedObject;
} else {
Entity = null;
}
if (Entity != null) {
if ((chkTableNameAsPrefixCtr.Checked) && (chkTableNameAsPrefixCtr.Visible)) {
finalAttName = Entity.Name + txtAttNameCtr.Text;
finalAttCaption = Entity.Caption + txtAttCapCtr.Text;
} else {
You need to be signed in and under a current maintenance contract to view premium knowledge articles.
© ALL RIGHTS RESERVED. Feedback Terms of Use Privacy Cookie Preference Center