How to add UserData to element using .net libraries?

Hi All

I am new here and I am new to microstation programing. I've been trying to add some information to certain Elements but not really know what I can use and how to do it. Can anyone please help me with this?

I've been trying to use new .Net libraries.

Regards

Parents
  • Hi ,

    In general we typically recommend to fully utilize Product Features and Customization capabilities first, then Custom (last mile) Programming solutions when the product does not produce the desired result(s).

    I agree with Jan that MicroStation ItemTypes that utilize the underlying EC APIs are the best path forward to attach and access data now and going forward.

    To get started I suggest checking out these topics in order (Product then Programming):

    1. MicroStation's EC Expressions. Review topics listed and in order presented, then (if needed...).
    2. EC API Topics (order presented including above - EC Expressions)
    3. MicroStation CONNECT Developer Training (Topics 11-13: EC Framework, DgnEC APIs and EC ItemTypes)

    HTH,
    Bob



  • Many Thanks.

    I will have a look at Item Types. 

    In general we typically recommend to fully utilize Product Features and Customization capabilities first, then Custom (last mile)

    The reason I want to add  additional information is that I chose to do project to learn programming for microstation which is something which I need. I didn't know that this part was difficult. I've just started and straggle to get any information regarding libraries, classes etc. Even the help files which have classes and methods are without any decryption of what they do. This makes it really difficult to even start it. In the past I did a bit of programming for rhino in rhinocommon and I only had one help file but with descriptions of method and properties and was so much easier to do staff in it (I also new Rhino which made it easier). With microstation I don't even know where to start as there isn't a lot and it seems (at least that is my impression) that there is a big change between V8a and Connect so it make it even more difficult to get what are the new ways and what are old ones. What I don't what is spend time on learning old ways without even knowing it (hence trying using .net libraries which seems are new ?)

    At least now I know that regarding my problem I should look at Item Types and regarding programming overall need to check MDL and EC Framework.

    Regards

  • Even the help files which have classes and methods are without any decryption of what they do.

    It was discussed many times and all developers ask for enhancement for long time...

    Fortunately MicroStationAPI help, even when describing C++, can be used in let's say 80% of NET classes, because NET API is very often just a wrapper around equal C++ classes (with some simplifications like C++ Handle and Handler, sometimes also IQuery, are merged into one NET class).

    This makes it really difficult to even start it.

    Use tutorials and blogs linked by Bob.

    Another great source of information are files in this forum, where you can find more examples and presentations.

    With microstation I don't even know where to start

    Yes, that's common problem: MicroStation is product with nearly 40 years history (so it is extremely feature rich, but also with huge obsolete "do not use" tools and features ;-), and Bentley open the product at quite low level, which leads to API with hundreds of classes.

    and it seems (at least that is my impression) that there is a big change between V8a and Connect so it make it even more difficult to get what are the new ways and what are old ones.

    Yes, you are right: In my opinion (based on trainings I did and code I helped to migrate) it is better to learn CE API from scratch and do not try to migrate V8i knowledge (especially when it is C API-based).

    With regards,

      Jan

  • Hi ,

    On the topic of Getting Started and Learning it may be helpful to take a look at our Developer Training page where you can find some helpful links towards learning and getting started with: MicroStation VBA and MDL (Native C++/C and Managed C#) APIs.

    Of course, please feel free to Search and Ask questions on our forums like you have already done here for help too.

    Thank you and HTH,
    Bob



Reply Children
No Data