it seems property handler SetValue method doesn't work in MicroStation CONNECT Edition
Simple test code:
Dim esc As ElementScanCriteria
Set esc = New ElementScanCriteria
Dim ee As ElementEnumerator
Set ee = ActiveModelReference.Scan(esc)
Do While ee.MoveNext
Private Sub ProcessElement(el As ShapeElement)
Dim ph As PropertyHandler
Set ph = CreatePropertyHandler(el)
Dim accstr() As String
accstr = ph.GetAccessStrings
If (True = ph.SelectByAccessString("Weight")) Then
In MicroStation V8i this code changes the weight of all found shapes to 7, in CONNECT Edition it does nothing. I tested also other access string with the same (bad) results.
Defect 290647 has been logged for this.
Answer Verified By: Jan Šlegr
Hi Leonard Jones
Leonard Jones said:Defect 290647 has been logged for this.
Can you please check if this defect was solved in Update 1 release? I made a quick test and it seems it still does not work, but I'd like to be sure the problem is not in my code.
Labyrinth Technology | dev.notes() | cad.point
This defect is fixed and will be available in the next update (Update 2). Regards, Leonard Jones.
Paul Connelly said:Just be aware - the VBA PropertyHandler interface has always had an ambiguity problem.
It's good comment. I did not think about too much but it's evident such problem can arise. Fortunately usually the customer is author of data structure, regardless it was tags, EC data or ItemTypes (or is able to negotiate it).
It looks like good best practices to don't use common names for ItemTypes properties.
Tested and confirming this Defect 290647 is fixed in MicroStation CONNECT Edition Update 2 – Version 10.02.00.39
Resolved issues in MicroStation CONNECT Edition Update 2