while transitioning to Rhino 6, there are two more obstacles to overcome, one is working with Dialogs now that we are MFC independent and the other is Conduit…we will leave the first one for later, and I have a question for Conduit. If I do everything as I did before:
1.Create my Conduit class derived from CRhinoDisplayConduit (I have to do this manually btw…VS Class Wizzard “cannot find base class CRhinoDisplayConduit”)…and then I change the constructor to
I see those couple of points in the pts array blink for a moment and immediately disappear…What is the catch? Also couple of times when I tested the code, and I zoomed in and out Rhino actually crashed…but lets assume that was an accident or that the problem was somewhere else for now…what should I do so that the points stay in the loop like they did before?
Hm…I made a new project…and put only the code that you provided (so no need to send you the copy of it)…and it worked… BUT
I realized I could see the points only because of the CRhiGetString command prompt…I deleted conduit.Disable() and conduit.m_doc.Regen(). but still, the moment I pressed ENTER the points disappeared… You can try it yourself…In your example, if you just deleted everything bellow CRhinoGetString the points will appear only for a moment and immediately disappear…
This was not the case before…nor is it logical in my opinion…the moment I Enable the conduit it should show everything inside it, in the ExecConduit loop, until I disable it…right? GetString should not enter the equation in any way…
as often is the case, the simplest solution was the right one. The moment I set the conduit to be a global variable it all went fine…initializing it inside the command was a mistake…I guess the moment the RunCommand was done, the conduit went out of scope…thanks again.