Execute rhino command from plugin

Hello, thank you for the code. However I have anothe issue, if right after I run horizontal zebra, I want to run vertical zebra, when the command window appears, then both options are selected. How can I avoid this issue and see in the window just one option selected. Below the lines of code I added to the file sent before.

// vertical direction
CRhinoZebraAnalysisSettings settings = RhinoApp().AppSettings().ZebraAnalysisSettings();
  if (settings.m_stripe_thickness != 6)
  {
    settings.m_stripe_thickness = 6;
    settings.m_stripe_direction = 1;
    RhinoApp().AppSettings().SetZebraAnalysisSettings(settings);
    context.m_doc.Redraw();
  }

//horizontal direction

CRhinoZebraAnalysisSettings settings = RhinoApp().AppSettings().ZebraAnalysisSettings();
  if (settings.m_stripe_thickness != 6)
  {
    settings.m_stripe_thickness = 6;
    settings.m_stripe_direction = 0;
    RhinoApp().AppSettings().SetZebraAnalysisSettings(settings);
    context.m_doc.Redraw();
  }

Thank you a lot if you could help me

Hi @f.leon.marquez95,

Perhaps you need to make two commands: one that does vertical and one that does horizontal?

– Dale

Thank you for the answer, but either way I cannot solve the problem of getting just one option selected. Perhaps it has something to do with a display method?.

Thank you very much