Export Model List

Good Morning All,

Is there a way to export the list of all the Models in a V8i SS2 .dgn file?

I just want to be able to easily record all the Models in a file for documentation, to keep track of edits and other possible administrative tasks. It would be very helpful for managing Cell Libraries too. Thanks.

God bless,

David

Parents
  • Hi David,

    it's not clear what information you would like to record (model name onlyu, anything else?) and what level of automation is required (manuall, key-in, batch process...). Jose's advice is the best in my opinion for manual export, which maybe is enough for you. MicroStation V8i (SELECTseries 2) does not provide any reporting functionality.

    An alternative solution when an automation is required (e.g. to record models from more models in batch process) is to use MicroStation VBA macro. I found (and modified a bit) some my older code (I guess I created it for some training ;-)

    Option Explicit
    
    Const outputFolder = "D:\temp\"
    
    Public Sub SaveListOfModels()
        
        Dim outputFileNum As Integer: outputFileNum = 1
        Dim outputFile As String: outputFile = ConstructExportFileFullPath
        
        Open outputFile For Append As outputFileNum
        
        SaveListOfModelsToFile outputFileNum
        
        Close outputFileNum
    
    End Sub
    
    Private Sub SaveListOfModelsToFile(fileNum As Integer)
    
        Dim model As ModelReference
        
        For Each model In ActiveDesignFile.Models
            Print #fileNum, model.Name
        Next
    
    End Sub
    
    Private Function ConstructExportFileFullPath() As String
    
        Dim activeDesignFileName As String: activeDesignFileName = ActiveDesignFile.Name
        Dim exportFileName As String: exportFileName = outputFolder & activeDesignFileName & ".txt"
        ConstructExportFileFullPath = exportFileName
    
    End Function
    

    With regards,

      Jan

  • Hi Jan,

    Thanks for the help. To clarify what I am looking for, sorry for not being clearer, I was hoping to get most if not all the information showed in the Models list in MicroStation V8i SS2. In addition to the information that Jose's suggestion will get me: Model Type, 2D/3D, Annotation, and Sheet Name. We will be moving the Cells over to ORD-CE soon and it would be nice to be able to record all the Cell information and be able to track the changes as we make them.

    I am somewhat new to the programming side of things and I could use some instructions on how to run your VBA. I have copied the text to a .txt file and have tried to run it through the batch process but it did not work. I have also replaced '.txt' with '.mvba' to the file name and tried to load it through 'mdl load ...' but that did not work either. I am sure I am missing something simple. Thanks a lot!

    God bless,

    David

    David Sullivan

    Engineering Software Support Engineer

    MS V8i SS2 v08.11.07.492

    MS ORD-CE v10.09.00.91

Reply
  • Hi Jan,

    Thanks for the help. To clarify what I am looking for, sorry for not being clearer, I was hoping to get most if not all the information showed in the Models list in MicroStation V8i SS2. In addition to the information that Jose's suggestion will get me: Model Type, 2D/3D, Annotation, and Sheet Name. We will be moving the Cells over to ORD-CE soon and it would be nice to be able to record all the Cell information and be able to track the changes as we make them.

    I am somewhat new to the programming side of things and I could use some instructions on how to run your VBA. I have copied the text to a .txt file and have tried to run it through the batch process but it did not work. I have also replaced '.txt' with '.mvba' to the file name and tried to load it through 'mdl load ...' but that did not work either. I am sure I am missing something simple. Thanks a lot!

    God bless,

    David

    David Sullivan

    Engineering Software Support Engineer

    MS V8i SS2 v08.11.07.492

    MS ORD-CE v10.09.00.91

Children