AnsweredAssumed Answered

some error about selectionBox

Question asked by Lenny Yang on May 29, 2019
Latest reply on May 29, 2019 by Lenny Yang

dear all:

      I  have some question about selectionBox.

      I create a property Manager page have three selection box . and set different PropertyManagerPageSelectionbox.mark to these selectionbox.it have some error when i debug the program.

see the image:

 

here is the pivotal code==========================================================

 

//Add two selection boxes

controlType = (int)swPropertyManagerPageControlType_e.swControlType_Selectionbox;

caption = "";

 

alignment = (int)swPropertyManagerPageControlLeftAlign_e.swControlAlign_Indent;

options = (int)swAddControlOptions_e.swControlOptions_Visible + (int)swAddControlOptions_e.swControlOptions_Enabled + (int)swAddControlOptions_e.swControlOptions_SmallGapAbove;
tip = "Select an edge, face, vertex, solid body, or a component";

pm_Selection1 = (PropertyManagerPageSelectionbox)pm_Group.AddControl2(Selection1ID, (short)controlType, caption, (short)alignment, (int)options, tip);
pm_Selection2 = (PropertyManagerPageSelectionbox)pm_Group.AddControl2(Selection2ID, (short)controlType, caption, (short)alignment, (int)options, tip);
pm_Selection3 = (PropertyManagerPageSelectionbox)pm_Group.AddControl2(Selection3ID, (short)controlType, caption, (short)alignment, (int)options, tip);


swSelectType_e[] filters = { swSelectType_e.swSelSOLIDBODIES };
object filterObj = null;
filterObj = filters;

pm_Selection1.SingleEntityOnly = false;
pm_Selection1.AllowMultipleSelectOfSameEntity = false ;
pm_Selection1.AllowSelectInMultipleBoxes = false;
pm_Selection1.Height = 50;
pm_Selection1.SetSelectionFilters(filterObj);
pm_Selection1.Mark = 1;

pm_Selection2.SingleEntityOnly = true;
pm_Selection2.AllowMultipleSelectOfSameEntity = false;
pm_Selection2.AllowSelectInMultipleBoxes = false;
pm_Selection2.Height = 50;
pm_Selection2.SetSelectionFilters(filterObj);
pm_Selection2.Mark = 2;

pm_Selection3.SingleEntityOnly = true;
pm_Selection3.AllowMultipleSelectOfSameEntity = false ;
pm_Selection3.AllowSelectInMultipleBoxes = false;
pm_Selection3.Height = 50;
pm_Selection3.SetSelectionFilters(filterObj);
pm_Selection3.Mark = 3;

 

here is the pivotal code==========================================================

PS:

1,if the property mgr Page just have two selectionbox no such error will occur.

2,if haven't set mark to these selectionbox no such error will occur.

3,if you want to test my program ,PLS download the attach and run the program .you can new a swPart Doc have some body to .reappear my question.

Attachments

Outcomes