Quantcast
Channel: MicroStation Programming - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 1677

Re: [V8i VBA] How to judge the original file format and the existing DGN format?

$
0
0

Yes I need both current and original file format. Your codes work! (After deleting On Error GoTo ...., because ReportError can't work in VBA)

Can you help explain what is the "FormatMajorVersion" , "FormatMinorVersion" & also those numbers which extracted by Property Handler in VBA?

Running code as follow:

Sub GetValue()
    Dim oPH As PropertyHandler
    Dim accessStrings As String
 
    Set oPH = CreatePropertyHandler(ActiveDesignFile)
    oPH.SelectByAccessString "Format"
    accessStrings = oPH.GetValue
    Debug.Print accessStrings
    
    oPH.SelectByAccessString "FormatMajorVersion"
    accessStrings = oPH.GetValue
    Debug.Print accessStrings
    
    oPH.SelectByAccessString "FormatMinorVersion"
    accessStrings = oPH.GetValue
    Debug.Print accessStrings
End Sub

Results in a Microstation V7 file:
Format = 1
FormatMajorVersion = 8
FormatMinorVersion = 104


Viewing all articles
Browse latest Browse all 1677

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>