This script will go through all the tables in the model and update key constraints and relations that are still using a default name. Place the script in a sub-folder to the MR install/exe called Scripts\User Defined and it will appear in the Scripts Explorer tab under User Defined scripts. Select the script in the explorer and then click the run button in the Property Browser. 1) bring up the Script Explorer 2) right click on "User Defined" and select "New Script" 3) copy/paste the script below into the edit control 4) hit the run button (the first icon in the toolbar above the edit control) Note: you can undo/redo the effects of this script as with any Model changes /********** start of script *************/ Sub Evaluate_OnLoad() Set Context = CreateObject("SCF.ScriptContext") Set Document = Context.ScriptDocument Set ThisScript = Context.Object Set Options = Context.Options Set Model = ThisScript.Model Document.Write("Updating Model " & Model.AsObject.Property("Name").AsString & " Constraint Names..." & vbLf) Model.BeginTransaction("Change Constraint Names") Set Tables = Model.AsObject.Children("Table") For Each Table In Tables NumKeys = 0 TableName = Table.Property("Name").AsString Set Keys = Table.Children("Key Constraint") For Each Key in Keys NumKeys = NumKeys + 1 OldName = Key.Property("Name").AsString If Left(OldName, 14) = "Key_Constraint" Then If Key.Property("Type").AsString = "Primary" Then NewName = "PK" Else NewName = "UQ" End If If Len(NumKeys) = 1 Then NewName = NewName & "0" End If NewName = NewName & NumKeys & "_" & TableName NewName = UCase(Left(NewName, 32)) If NewName <> OldName Then Document.Write(vbTab & "Changing Key Constraint Name " & TableName & "." & OldName & " to " & NewName & vbLf) Set Prop = Key.Property("Name") Prop.FromString(NewName) Call Key.SetProperty("Name", Prop) End If End If Next NumKeys = 0 Set Relations = Table.Children("Relation") For Each Relation in Relations NumKeys = NumKeys + 1 OldName = Relation.Property("Name").AsString If Left(OldName, 8) = "Relation" Then NewName = "FK" If Len(NumKeys) = 1 Then NewName = NewName & "0" End If NewName = NewName & NumKeys & "_" & TableName NewName = UCase(Left(NewName, 32)) If NewName <> OldName Then Document.Write(vbTab & "Changing Relation Name " & TableName & "." & OldName & " to " & NewName & vbLf) Set Prop = Relation.Property("Name") Prop.FromString(NewName) Call Relation.SetProperty("Name", Prop) End If End If Next Next Model.EndTransaction() End Sub