How to dynamically draw DisplayConduit

I have a simple table, and I want to preview this table while inserting it and moving the mouse.
I created a DisplayConduit for this table, but during the moving process,
the table doesn’t refresh and requires zooming the view to display. What could be the reason for this?
like this.
this is my code

As you only post screenshots, and not the whole code, it is a bit of guessing. I see you are setting the simpleTable.Origin during the dynamic draw, and in the DrawForeground of the display conduit the lines for rows and columns are drawn and the text. But I don’t see any use of the origin during the drawing.

My guess is that when you set the origin, you do not update the row/column lines or the text to use the new origin.

If this is not helping, please post your code.

You need to redraw on mouse move.

I don’t think you want to use a display conduit at all in this case. You are running a “GetPoint” operation to get the insertion point.

Create a subclass of Rhino.Input.Custom.GetPoint and override the OnMouseMove, OnDynamicDraw functions to draw your geometry while placing it.

1 Like

I have already tried it, but it doesn’t work unless drawing directly within the event method, like this.

Thank you for your reply.
When changing the origin point, I also modified the table’s border and text.

Thank you for your reply.
I think this method is not general enough and has too strong coupling

From what you describe and your initial video the GetPoint approach looks exactly like what you would want. Of course the decision is up to you.

In the absence of other options, this method is an acceptable choice. :grin: