SetCustomProperty strange behaviour with strings

Hello,

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.

Jean-Claude Fische

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 With

End Sub

PL_test.dgn
Parents Reply Children