Rubber Band DirectContext3D API

Rubber Band DirectContext3D API

jose_marquez5Z5GC
Participant Participant
599 Views
4 Replies
Message 1 of 5

Rubber Band DirectContext3D API

jose_marquez5Z5GC
Participant
Participant

Hi everyone,

 

I have a question does someone knows how to Refresh the Active View with Revit rendering loop Tick Event.

 

This is my issue I created a rubber band command that draws a line between the first point and the cursor position on the screen, the way I'm refreshing the view is subscribing to the Idling Event and force Refresh the view, in that way the SceneRender method get called and the line is redraw again, giving the effect of a rubber band. My issue is that I want to use the snap functionality of the PickPoint() method but when PickPoint is active the Idling event doesn't fire as expected, that's why I need another way to refresh the view or a different approach does anybody knows of a solution.

 

Thanks before hand.

0 Likes
Accepted solutions (2)
600 Views
4 Replies
Replies (4)
Message 2 of 5

rcrdzmmrmnn
Advocate
Advocate
Accepted solution

Can't you just use model line command? I have a similar workflow.
I activate an Iupdater, then, post command of model line. In the Updater I gather necessary info about the model line created, do stuff, and then ,delete the model line and deactivate the updater

Message 3 of 5

ricaun
Advisor
Advisor
Accepted solution

You need to refresh the view using other event, usually in the event that tracks the mouse movement/position.

 

This is a sample does that with a rectangle using PickPoint and DirectContext3D.

 

ricaun_0-1758120353124.gif

 

 

 

Luiz Henrique Cassettari

ricaun.com - Revit API Developer

AppLoader EasyConduit WireInConduit ConduitMaterial CircuitName ElectricalUtils

Message 4 of 5

jose_marquez5Z5GC
Participant
Participant

Awesome solution I implemented and I'm using it in every adding that needs that type of interaction, thanks

Message 5 of 5

jose_marquez5Z5GC
Participant
Participant

I implemented the rubber band but have limitations for the second point, I cannot use the snaps from Revit making a lot more difficult the implementation, thanks anyways, this push me to learn the context 3D API 

0 Likes