Hi, André. Here's a simple VB script to run a model check on all models in your workspace. It will even recursively scan through folders, if you're using them, to look for all models. YOu can run it using Tools -> Execute Commands -> Edit/run Script, or you can put the code in the Extension.
--------------------------------------------------
CheckModels ActiveWorkspace
Private Sub CheckModels(oWorkspaceFolder)
Dim oWorkspaceElement, oModel
For Each oWorkspaceElement in oWorkspaceFolder
If oWorkspaceElement.IsKindOf(PdWSP.cls_WorkspaceFolder) Then
CheckModels(oWorkspaceElement)
Else
If oWorkspaceElement.IsKindOf(PdWSP.cls_WorkspaceModel) Then
Output "Opening " & oWorkspaceElement.Name & "..."
Set oModel = oWorkspaceElement.Open
If Not oModel Is Nothing Then
Output "Checking " & oModel.Name & "..."
oModel.CheckModel
End If
End If
End If
Next
End Sub
----------------------------------------------------------------
I don't understand your second question. I've never used stereotypes. Also, I wasn't aware that external tables could have foreign keys. Perhaps this is a DBMS difference? I'm using Oracle.
Good luck. I hope the script helps.
Sean