Function FindChild(Owner, ChildTypes, ChildName) Dim Children Set Children = Owner.Children(ChildTypes) Dim Child For Each Child In Children If Child.Property("Name").AsString = ChildName Then Set FindChild = Child Exit Function End If Next Set FindChild = Nothing End Function Function FindGraphicWithModelObject(Diagram, ModelObject, GraphicType) Set Graphics = Diagram.Children(GraphicType) For Each Graphic In Graphics If Graphic.Property("Model Object").AsObject.Equals(ModelObject) Then Set FindGraphicWithModelObject = Graphic Exit Function End If Next Set FindGraphicWithModelObject = Nothing End Function Sub SetTablePositions(FromDiagram, ToDiagram, GraphicType, Document) Dim TableGraphics Set TableGraphics = FromDiagram.Children(GraphicType) Dim TableGraphic For Each TableGraphic In TableGraphics Set ModelObject = TableGraphic.Property("Model Object").AsObject Set ToGraphic = FindGraphicWithModelObject(ToDiagram, ModelObject, GraphicType) If Not ToGraphic Is Nothing Then Set pPosition = TableGraphic.Property("Top Left Point") Call ToGraphic.SetProperty("Top Left Point", pPosition) If TableGraphic.HasProperty("Width") Then Set pWidth = TableGraphic.Property("Width") Call ToGraphic.SetProperty("Width", pWidth) Else ToGraphic.DeleteProperty("Width") End If If TableGraphic.HasProperty("Height") Then Set pWidth = TableGraphic.Property("Height") Call ToGraphic.SetProperty("Height", pWidth) Else ToGraphic.DeleteProperty("Height") End If Document.Write("Changed Position of " & ModelObject.Property("Name").AsString & vbLf) End If Next End Sub Sub Evaluate_OnLoad() ' change the following 4 lines to suit FromModelSubsetName = "Model Subset 1" FromDiagramName = "Diagram 1" ToModelSubsetName = "Model Subset 2" ToDiagramName = "Diagram 1" Set Context = CreateObject("SCF.ScriptContext") Set Document = Context.ScriptDocument Set ThisScript = Context.Object Set Options = Context.Options Set Model = ThisScript.Model Set Framework = CreateObject("SCF.ScriptFramework") Dim FromModelSubset Set FromModelSubset = FindChild(Model.AsObject, "Model Subset", FromModelSubsetName) If FromModelSubset Is Nothing Then Document.Write("Unable to find FromModelSubset " & FromModelSubsetName) Exit Sub End If Set FromDiagram = FindChild(FromModelSubset, "Diagram", FromDiagramName) If FromDiagram Is Nothing Then Document.Write("Unable to find FromDiagram " & FromDiagramName) Exit Sub End If Set ToModelSubset = FindChild(Model.AsObject, "Model Subset", ToModelSubsetName) If ToModelSubset Is Nothing Then Document.Write("Unable to find ToModelSubset " & ToModelSubsetName) Exit Sub End If Set ToDiagram = FindChild(ToModelSubset, "Diagram", ToDiagramName) If ToDiagram Is Nothing Then Document.Write("Unable to find ToDiagram " & ToDiagramName) Exit Sub End If Document.Write("Updating Diagram " & ToDiagramName & " Table and View Positions..." & vbLf) Model.BeginTransaction("Copy Table Position") SetTablePositions FromDiagram, ToDiagram, "Table Graphics", Document SetTablePositions FromDiagram, ToDiagram, "View Graphics", Document Model.EndTransaction() Document.Write("Updating Diagram " & ToDiagramName & " Done!" & vbLf) End Sub