[C# Connect U14] Transient-Element not working for Parametric Elements

I used the COM Functions CreateTransientElementContainer1(null, MsdTransientFlags.Overlay, MsdViewMask.AllViews, MsdDrawingMode.Hilite); and AppendCopyOfElement(element); but this doesn't work for Parametric Elements. I tested it with Parametric Volumes and Parametric Cells. I didn't tested every Element Type but non Parametric Elements do work.
Is there an easy fix to this or do I need to use a different function now?

Parents
  • I used the COM Functions CreateTransientElementContainer1 etc.

    Better questions might be...

    • How can I handle transient elements with the .NET API?
    • Can I include a parametric element in a transient container using the .NET API?
    • Can I include a parametric element in a transient container using the C++ MicroStationAPI?

    Unfortunately, I see no mention of transient in the MstnPlatformNET or DgnPlatformNET documentation.

    I added the third question because the C++ API provides the core of transient element handling.  If C++ can't do it, then neither can the other languages.

     
    Regards, Jon Summers
    LA Solutions

  • Unfortunately, I see no mention of transient in the MstnPlatformNET or DgnPlatformNET documentation.

    Yes and no. I have several hits but not Transient Element. I'm aware that there is no NET Function for it and other Forum Topics said it too.

    The old COM Function is still there. When it can't handle all Elements and no fix can be expected, than the question would be if the C++ API can handle parametric elements or if transient elements are a thing of the past and other solutions need to be used.

    Mit freundlichen Grüßen / Best regards
    Jean-Pierre Hundhausen

    |  AB_DATE Engineering  Software   |  ab-date.de  |

  • The question would be if transient elements are a thing of the past

    No: transient elements provide useful functionality.  If anything, transients have been enhanced for MicroStation CONNECT.  It's just that the C++ functionality has not been ported to .NET.

    Keep in mind that transients are not used by third-party developers very much, but they are used by Bentley internal developers (why else would there be a transient model in every DGN file?).  Yours is the first question I remember seeing about using transients with .NET in MicroStation CONNECT.

     
    Regards, Jon Summers
    LA Solutions

Reply
  • The question would be if transient elements are a thing of the past

    No: transient elements provide useful functionality.  If anything, transients have been enhanced for MicroStation CONNECT.  It's just that the C++ functionality has not been ported to .NET.

    Keep in mind that transients are not used by third-party developers very much, but they are used by Bentley internal developers (why else would there be a transient model in every DGN file?).  Yours is the first question I remember seeing about using transients with .NET in MicroStation CONNECT.

     
    Regards, Jon Summers
    LA Solutions

Children
  • I imported the mdlTransient_addElemDescr and it also doesn't work with transient elements. As it looks mdlTransient_addElement isn't working or I'm doing something wrong. With the Interop Element I get the ElementDescP. With the .NET Element, I can only get the ElementP. ElementDescP is Null.
    Maybe using directly C++ would give better results.

    Application.MdlLib.mdlTransient_addElemDescr() is even worse. A 32bit Pointer in a 64bit Program? They probably forgot to port this. I guess it would be just a Wrapper to import the native function.

    Mit freundlichen Grüßen / Best regards
    Jean-Pierre Hundhausen

    |  AB_DATE Engineering  Software   |  ab-date.de  |