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?
Jean-Pierre Hundhausen said:I used the COM Functions CreateTransientElementContainer1 etc.
CreateTransientElementContainer1
Better questions might be...
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
Jon Summers said: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 regardsJean-Pierre Hundhausen
| AB_DATE Engineering Software | ab-date.de |
Jean-Pierre Hundhausen said: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.
Hi J-P,
Jean-Pierre Hundhausen said:than the question would be if the C++ API can handle parametric elements
to understand your issue better: In what workflow you need transient parametric element?
Is the element created dynamically (not existing in model yet), but should be displayed statically in views or it's about to take the element from model and to display it also as transient (e.g. because its original level is switched off)?
Regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
It's to highlight a existing item. Dynamic would be a bad option and just selecting the element isn't an option for this workflow (we have this workflow already). Visualization (don't know the Function Names we use) might be an alternative but requires more work. First I wanted to check if there is no faster alternative or fix.
Jean-Pierre Hundhausen said:It's to highlight a existing item.
Maybe ElementAgendaDisplayable can be used in this situation?
It's not flexible, because it uses (I guess) "MicroStation highlight", so no flexibility to add any extra features, but is simply and is available in NET.
Jean-Pierre Hundhausen said:Maybe using directly C++ would give better results.
The best, and when requirements are complex, probably the only, solution is to implement wrapper around IViewTransient object.
With regards,
Answer Verified By: Jean-Pierre Hundhausen
Jan Šlegr said:Maybe ElementAgendaDisplayable can be used in this situation?
This Function looks very good. For my case it solves the problem.