AnsweredAssumed Answered

API: several radio button groups on PMP

Question asked by Christoph Engelhardt on Jun 28, 2017
Latest reply on Jun 30, 2017 by Christoph Engelhardt

Hi there,

I would like to create a property manager page with two radio button groups. The following example creates a PMP with two groups, the first group has two radio buttons, the second group has three radio buttons. I would like that the user can select two radio buttons, one per group. Unfortunately, the user can only select one radio button out of the five.

 

Is there a way to achieve the desired behavoir?

 

Thanks in advance!

 

    public class drw2graphicPMP : IPropertyManagerPage2Handler9

    {

        ...

        public drw2graphicPMP(ref SldWorks.ISldWorks iSwApp)

        {

           ...

            // add controls

            int groupoptions = (int)(swAddGroupBoxOptions_e.swGroupBoxOptions_Expanded | swAddGroupBoxOptions_e.swGroupBoxOptions_Visible);

            int options = (int)swAddControlOptions_e.swControlOptions_Visible + (int)swAddControlOptions_e.swControlOptions_Enabled;

 

            pmGroupSelect = (PropertyManagerPageGroup)pmPage.AddGroupBox(idGroupSelect, "Select Sheets:", groupoptions);

 

            pmRadioButton1 = (PropertyManagerPageOption)pmGroupSelect.AddControl2(idRadioButton1,                (int)swPropertyManagerPageControlType_e.swControlType_Option, "active sheet", (int)swPropertyManagerPageControlLeftAlign_e.swControlAlign_Indent,                options, "selects active sheet.");

            pmRadioButton2 = (PropertyManagerPageOption)pmGroupSelect.AddControl2(idRadioButton2,                (int)swPropertyManagerPageControlType_e.swControlType_Option, "all sheets", (int)swPropertyManagerPageControlLeftAlign_e.swControlAlign_Indent,                options, "selects all sheets.");

 

            pmGroupFormat = (PropertyManagerPageGroup)pmPage.AddGroupBox(idGroupFormat, "Select Format:", groupoptions);

 

            pmRadioButton3 = (PropertyManagerPageOption)pmGroupFormat.AddControl2(idRadioButton3,                (int)swPropertyManagerPageControlType_e.swControlType_Option, "TIFF", (int)swPropertyManagerPageControlLeftAlign_e.swControlAlign_Indent, options,                "export as TIFF");

            pmRadioButton4 = (PropertyManagerPageOption)pmGroupFormat.AddControl2(idRadioButton4,                (int)swPropertyManagerPageControlType_e.swControlType_Option, "PNG", (int)swPropertyManagerPageControlLeftAlign_e.swControlAlign_Indent, options,                "export as PNG");

            pmRadioButton5 = (PropertyManagerPageOption)pmGroupFormat.AddControl2(idRadioButton5,                (int)swPropertyManagerPageControlType_e.swControlType_Option, "GIF", (int)swPropertyManagerPageControlLeftAlign_e.swControlAlign_Indent, options,                "export as GIF");

 

        }

 

Outcomes