If I execute following lines on attached dgn file, windows property dialog doesn't display my "SOME STRING" string and the type of "bstrVal" isn't recognized. On other dgn files the code is working fine. What is wrong with my file or with SetCustomProperty and does a workaround exist?
Thanks for help.
Sub test() Dim iVal As Integer Dim lVal As Long Dim rVal As Double Dim sVal As Single Dim bVal As Boolean iVal = 1000 lVal = 1001234 rVal = 27.529 sVal = 100.001 With ActiveDesignFile .SetCustomProperty "iVal", iVal .SetCustomProperty "lVal", lVal .SetCustomProperty "bstrVal", "SOME STRING" .SetCustomProperty "rVal", rVal .SetCustomProperty "sVal", sVal .SetCustomProperty "boolVal", bVal .SetCustomProperty "DateTest", Date + Time End WithEnd Sub
From within MicroStation, when I check your DGN file's origin by selecting menu File > Properties, I found it is from DWG. Maybe this is the reason.
That's what I first supposed but it also occurs with pure dgn files.
After looking deeper, this behaviour concerns only files on which manually I have modified, added or deleted custom properties (with Windows XP properties tool).
It seems that Microstation doesn't like Windows to interfer custom properties?