Controlling display while using mdlWindow_display routines

Does anyone know of a way to control the display (view) while drawing with the mdlWindow_(element)Draw routines. I am able to draw in the view utilizing these routines, but of course, when the cursor is moved, the dynamic update of the view destroys what I have drawn. Using these routines to drawn geometry is only meant to be temporary, but I would like to control when the drawn elements are destroyed in the view. I have utilized the Transient routines to draw this geometry, but given the amount of items I need to draw to the screen, these routines involve way too much overhead, and are very slow. I realize the mdlWindow_(element)Draw routines are probably not designed to perform in this manner, but I was just curious if there is some view control I am missing, which would allow me to control these temporary view elements. Have tried binding the drawing routines to view functions, but the result is an annoying flicker in the display. Any help would be appreciated.

  • Unknown said:
    I have utilized the Transient routines to draw this geometry

    Transients are the way to go.  I don't see why 'these routines involve way too much overhead': you create an element and add it to the transient descriptor chain.

    If performance concerns you when adding many elements, then defer display until you've finished adding elements:

    const int DeferDisplay = 0;
    pTransients = mdlTransient_addElemDescr (..., ..., DeferDisplay);

     
    Regards, Jon Summers
    LA Solutions

    Answer Verified By: Larry Durke 

  •  
                    Thanks for the reply!! When using the Transient functions to paint many elements from my topology to the screen,  it is orders of magnitude longer (2-5 seconds) than using the mdlWindow_(element)draw routines. I am actually deferring display until all elements are added to the transient element descriptor. I know this does not sound like much of a delay, but in the context of command flow, it is extremely disruptive. You have to understand that I am coming from the V8 world where I was just using element display functions, but not adding to the file. Those routines were instantaneous. I am looking for that same performance. I have even employed range partitions in the topology to extract only that data which is in the confines of the current view, but the delay is still noticeable. If you have any other suggestions, I would greatly appreciate it.
     
    Thanks,
     
    Larry Durke
    Director – Software Development
    Roussey Companies
    Cell:      610-513-2281
    Phone:  610-524-1346  x103
     
  • Hi Larry,

    Please refer to my below article which uses ViewTransientHandler to draw a huge number of points in the view.
    communities.bentley.com/.../mdl-7
    This article is in Chinese, English version is in BDN private community.

    HTH, YongAn



  • Jon, thanks for your input. Issue has been resolved. Was using the Transient functions improperly.