How to use IViewTransient in .NET for CONNECT

Hello,

I am new to programming with Microstation's SDK and I've spent the last few days trying to figure out how to do some things. 

Now, I want to be able to draw geometry/images dynamically without having to add elements to the model, or add simple elements like lines or points, but use them as reference points to draw more complex and dynamic geometry dynamically.
It seems that IViewTransient is more or less what I need, and I tried as much as I could to replicate an example I found here: http://www.la-solutions.co.uk/content/CONNECT/MicroStationAPI/MicroStationAPI-ViewTransients.htm but in .NET.

I can implement a class that inherits from IVewTransient and explore the members of the ViewContext in DrawTransients(), but then I get stuck. A similar thing to IViewManager::GetManager() doesn't seem to exist in any namespace I searched, so I can't figure out how I would register my class so that its DrawTransients method can be called.

Regards,

Aristotelis Kolymparis

Parents
  • I want to be able to draw geometry/images dynamically without having to add elements to the mode

    This article describes the temporary objects you can implement in MicroStation CONNECT.  Note 's comment: A view decorator is good for things that may be changing every frame/cursor motion, an IViewTransient is good for things that don't change often.

    Unfortunately for you, the sample code is aimed at C++ developers.  I haven't tried to use transients with .NET.

     
    Regards, Jon Summers
    LA Solutions

  • Hi Jon,

    Thank you for your reply and furthermore let me thank you for your collection of examples and articles on your site!
    They are all quite helpfull and assisted me in figuring out a lot of things that would have taken much more time
    and frustration otherwise!


    As I understand the example in the link above is about using decorations and sprites, via the IViewDecoration interface,
    which is definitely usefull but all accounts point towards IViewTransient as being what I need.
    I don't require things to change every frame/cursor motion, rather, only every viewport update would be ideal.

    Unfortunately, as Jan said above, there seems to be a limitation on drawing Raster images with IViewTransients,
    which is a setback for sure.
    I will do experiments with the examples for both interfaces in c++ and after that I'll decide how to proceed.

    Best Regards,
    Aristotelis.

Reply
  • Hi Jon,

    Thank you for your reply and furthermore let me thank you for your collection of examples and articles on your site!
    They are all quite helpfull and assisted me in figuring out a lot of things that would have taken much more time
    and frustration otherwise!


    As I understand the example in the link above is about using decorations and sprites, via the IViewDecoration interface,
    which is definitely usefull but all accounts point towards IViewTransient as being what I need.
    I don't require things to change every frame/cursor motion, rather, only every viewport update would be ideal.

    Unfortunately, as Jan said above, there seems to be a limitation on drawing Raster images with IViewTransients,
    which is a setback for sure.
    I will do experiments with the examples for both interfaces in c++ and after that I'll decide how to proceed.

    Best Regards,
    Aristotelis.

Children
No Data