Key-in

I'm developing a routine that opens a file with opendesignfileforprogram. I cannot set a model of this file as active model reference. How can i send a key-in to this design file thru vba?

I need to send the following "reference merge all" and "reference makedirect A.dgn->B.dgn"...

I have implemented copy all elements but it looses clip boundaries...

Regards 

Parents Reply Children
  • I have implemented copy attachement with the following routine, but i always get "file not found error" in the reattach line and i don't know what i'm doing wrong.

    Sub CopyAtt(nMdl As ModelReference, oModel As ModelReference)
    Dim Att As Attachment, Ott As Attachment, aName As String, fName As String
    For Each Att In nMdl.Attachments
    fName = ActiveDesignFile.FullName
    aName = oModel.Name
    Set Ott = Att.Copy
    Ott.Reattach fName, aName
    Ott.Rewrite
    Next
    End Sub


    - nMdl is a attachment with livenestering
    - oModel is the model where nMdl is
    - we want to "copy/move" the nested attachments in nMdl to oModel with the same settings.
    Any help will be really appreciated!

    Regards