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!!!

-Christopher Johnson

Parents
  • It's possible IF you're will to use the MicroStation XML API. Not necessarily "quick and easy", but possible....

     

    Bruce

  • Hi Christopher,

    A "quick and easy" way is using key-ins. The steps are as below:

    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).

    2. Open your design file in MicroStation, keyin MDL LOAD Bentley.ECXAttributesAddin.dll to load ecxattribute application.

    3. Keyin ECX Schema Import d:\TestSchema.01.00.ecschema.xml to import this external schema file into your active design file.

    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.

    5. Use MVBA's PropertyHandler to assign values to these properties.

    HTH, YongAn



    Answer Verified By: chrisedjohn 

Reply
  • Hi Christopher,

    A "quick and easy" way is using key-ins. The steps are as below:

    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).

    2. Open your design file in MicroStation, keyin MDL LOAD Bentley.ECXAttributesAddin.dll to load ecxattribute application.

    3. Keyin ECX Schema Import d:\TestSchema.01.00.ecschema.xml to import this external schema file into your active design file.

    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.

    5. Use MVBA's PropertyHandler to assign values to these properties.

    HTH, YongAn



    Answer Verified By: chrisedjohn 

Children