V8i VBA - I Want My Very Own PropertyHandler!

This has bugged me for a while. I'd really really like to create my own category of properties to associate with elements. Way easier for users to query than tags, and something that Navigator can display in clash results. I've been able to successfully read these properties that other applications (i.e. InRoads) are able to create on their own (lucky ducks), but no success adding my own. I'd like to mimic the custom approach shown below to adding metadata. Any guidance would be greatly appreciated!!!

1. Save attached ECSchema file in the folder d:\ (I created this file for your with application Bentley Class Editor. This app is delivered in MicroStation SDK. I don't include all properties you want in this schema, just a demo).

4. Select some elements you want assign properties to them. Keyin ECX Instance AttachWithStoredSchema TestSchema:Component to attach ECInstance to selected elements. Please see the captured pic which is just attached ECInstance to a shape element.

1. Save attached ECSchema file in the folder d:\ (I created this file for your with application Bentley Class Editor. This app is delivered in MicroStation SDK. I don't include all properties you want in this schema, just a demo).

4. Select some elements you want assign properties to them. Keyin ECX Instance AttachWithStoredSchema TestSchema:Component to attach ECInstance to selected elements. Please see the captured pic which is just attached ECInstance to a shape element.

Every thing is working great... (wait for it) but, after I attach the schema to an element, I'm not able to access it using the SelectByAccessString method UNLESS I manually edit the value of it via the dialog. After doing that even just once, I'm able to select it thereafter. I'm even able to see my new attributes in the dialog box and using the GetAccessStrings to create an array of all of them - they're in the list - but I'm not able to select any until I manually do so via the dialog box.

I've tried reloading the object as it notes in the help. I've also tried reloading the session to make sure the file and element is written. No luck. The only thing that has worked is the manual edit so far.

This is a known condition. The property handler needs the value to be initialized. I would look to the ECObjects api that we added for Select Series 3. It is managed code so you will need to write an AddIn to work with the objects.

Try adding a default value to your property in the class editor.To do this open the schema in the class editor and then in the properties tab select the custom attributes button.Add 'Calculated ECProperty Specification' custom property to the property and then edit the following values.EC Expression needs to have a value which can be a space.Is Calculated as default value only - set this to True.

All of the properties will have values now so you can edit with the propertyhandler.