RhinoCommon digitizer plugin for Rhino 6

Hi!

Im updating my digitizer plugin for rhino 5, to work with rhino 6.
Im using the template of RhinoCommon for Windows of the DigitizerPlugin, i can load the and connect to the digitizer plugin perfectly to rhino 6, but my problem is the next:

After disconnecting the digitizer plugin, i can no longer to reconnect to the plugin digitizer and the rhino console shows me the next message “Unable to connect to the digitizer.”

Im using the template of the DigitizerPlugin for RhinoCommon v6. and adding/changing the next code

    protected override bool EnableDigitizer(bool enable)
    {
     // if the plugin was enabled then return true to start the digitizer calibration
     // when the user wants disconnect the digitizer, then the calibration is not necessary            
            return enable;
    }

    protected override UnitSystem DigitizerUnitSystem
    {
        get { return UnitSystem.Millimeters; }
    }

    protected override double PointTolerance
    {
        get { return 0.01; }
    }

all this using _Digitize and _DigDisconnect commands respectively, and the digitizer toolbar.

thanks!

Hi @Ignacio,

Was your Rhino 5 plug-in written with RhinoCommon or C++? Did what you describe work in Rhino 5?

– Dale

Hi @dale

Yes!, im using RhinoCommon in my digitizer plugin for rhino 5 and rhino 6. I tested the same code using RhinoCommon5 for Rhino 5 and there was no problem, i can disconnected and reconnected my digitizer plugin without problems (using rhino5 of course). But in RhinoCommon6 for Rhino 6 im not able to reconnect to my digitizer plugin :frowning_face:

Hi @Ignacio,

Are you getting any kind of error message? How can I repeat what you’re seeing?

– Dale

Hi @dale

No, im not getting any error message, just the text “Unable to connect to the digitizer” in the Rhino console.

rhino_message

The code and example that im using is the “Digitizer plugin” template from the RhinoCommon templates.

rhino_digitizer

And im just changing the next functions:

protected override bool EnableDigitizer(bool enable)
{
 // if the plugin was enabled then return true to start the digitizer calibration
 // when the user wants disconnect the digitizer, then the calibration is not necessary            
        return enable;
}

protected override UnitSystem DigitizerUnitSystem
{
    get { return UnitSystem.Millimeters; }
}

protected override double PointTolerance
{
    get { return 0.01; }
}

Hi @Ignacio,

I am able to repeat this.

https://mcneel.myjetbrains.com/youtrack/issue/RH-45409

Looks like an easy fix.

Thanks for reporting.

– Dale