' Program     :    Modelref.bas
' Author      :    Peter Bekkers, Oranjewoud
' E-mail      :    peter.bekkers@oranjewoud.nl
' Date        :    2004
' Definition  :    Attaches the Design Model as a reference of the Sheet Model.


Sub main

    Dim c(0 To 2)     As String
    Dim n(0 To 2)     As Integer
    Dim filenaam      As String
 
    filenaam = MbeDgnInfo.dgnFileName
    
' The text Design_Model becomes the Logical name of the reference
    c(1) = "reference attach " & Chr$(34) & filenaam & Chr$(34) & ",,Design_Model,,,"
    n(1) = Len(c(1))
    MbeSendKeyin c(1)


' If you want to adjust the magnification of a view so all elements are visible,
' use the three lines that follows:
'   c(2) = "fit view extended 1"
'   n(2) = Len(c(2))
'   MbeSendKeyin c(2)
    
    
End Sub
 