//------------------------------------------------------------------------------
        //---------------------Block UI Styler Callback Functions--------------------------
        //------------------------------------------------------------------------------

        //------------------------------------------------------------------------------
        //Callback Name: initialize_cb
        //------------------------------------------------------------------------------
        public void initialize_cb()
        {
            try
            {
                group0     = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group0");
                group      = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group");
                selectiObj = (NXOpen.BlockStyler.SelectObject)theDialog.TopBlock.FindBlock("selectiObj");
                group1     = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group1");
                vector     = (NXOpen.BlockStyler.SpecifyVector)theDialog.TopBlock.FindBlock("vector");
                color      = (NXOpen.BlockStyler.Toggle)theDialog.TopBlock.FindBlock("color");
                Selection.MaskTriple maskFace = new Selection.MaskTriple() //面
                {
                    Type             = 70,
                    Subtype          = 2,
                    SolidBodySubtype = UFConstants.UF_UI_SEL_FEATURE_ANY_FACE
                };
                Selection.MaskTriple maskBody = new Selection.MaskTriple() //面
                {
                    Type             = 70,
                    Subtype          = 0,
                    SolidBodySubtype = UFConstants.UF_UI_SEL_FEATURE_BODY
                };
                Selection.MaskTriple[] masks = { maskFace, maskBody };
                this.selectiObj.SetSelectionFilter(Selection.SelectionAction.ClearAndEnableSpecific, masks);//过滤只选择点和面
            }
            catch (Exception ex)
            {
                //---- Enter your exception handling code here -----
                theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString());
            }
        }
예제 #2
0
 //------------------------------------------------------------------------------
 //Callback Name: initialize_cb
 //------------------------------------------------------------------------------
 public void initialize_cb()
 {
     try
     {
         tabControl    = theDialog.TopBlock.FindBlock("tabControl");
         tabPage       = theDialog.TopBlock.FindBlock("tabPage");
         group5        = theDialog.TopBlock.FindBlock("group5");
         enum02        = theDialog.TopBlock.FindBlock("enum02");
         group1        = theDialog.TopBlock.FindBlock("group1");
         enum0         = theDialog.TopBlock.FindBlock("enum0");
         label01       = theDialog.TopBlock.FindBlock("label01");
         button0       = theDialog.TopBlock.FindBlock("button0");
         tabPage1      = theDialog.TopBlock.FindBlock("tabPage1");
         group4        = theDialog.TopBlock.FindBlock("group4");
         label02       = theDialog.TopBlock.FindBlock("label02");
         integer0      = theDialog.TopBlock.FindBlock("integer0");
         label03       = theDialog.TopBlock.FindBlock("label03");
         integer01     = theDialog.TopBlock.FindBlock("integer01");
         group3        = theDialog.TopBlock.FindBlock("group3");
         face_select0  = theDialog.TopBlock.FindBlock("face_select0");
         enum01        = theDialog.TopBlock.FindBlock("enum01");
         button02      = theDialog.TopBlock.FindBlock("button02");
         group         = theDialog.TopBlock.FindBlock("group");
         bodySelect0   = theDialog.TopBlock.FindBlock("bodySelect0");
         vector0       = theDialog.TopBlock.FindBlock("vector0");
         group2        = theDialog.TopBlock.FindBlock("group2");
         double0       = theDialog.TopBlock.FindBlock("double0");
         label0        = theDialog.TopBlock.FindBlock("label0");
         toggle0       = theDialog.TopBlock.FindBlock("toggle0");
         colorPicker0  = theDialog.TopBlock.FindBlock("colorPicker0");
         toggle01      = theDialog.TopBlock.FindBlock("toggle01");
         colorPicker01 = theDialog.TopBlock.FindBlock("colorPicker01");
         toggle02      = theDialog.TopBlock.FindBlock("toggle02");
         colorPicker02 = theDialog.TopBlock.FindBlock("colorPicker02");
         toggle03      = theDialog.TopBlock.FindBlock("toggle03");
         colorPicker03 = theDialog.TopBlock.FindBlock("colorPicker03");
         toggle04      = theDialog.TopBlock.FindBlock("toggle04");
         colorPicker04 = theDialog.TopBlock.FindBlock("colorPicker04");
         toggle05      = theDialog.TopBlock.FindBlock("toggle05");
         colorPicker05 = theDialog.TopBlock.FindBlock("colorPicker05");
         button01      = theDialog.TopBlock.FindBlock("button01");
     }
     catch (Exception ex)
     {
         theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString());
     }
 }
예제 #3
0
    //------------------------------------------------------------------------------
    //---------------------Block UI Styler Callback Functions--------------------------
    //------------------------------------------------------------------------------

    //------------------------------------------------------------------------------
    //Callback Name: initialize_cb
    //------------------------------------------------------------------------------
    public void initialize_cb()
    {
        try
        {
            selection0           = (NXOpen.BlockStyler.SelectObject)theDialog.TopBlock.FindBlock("selection0");
            toggleJiaju          = (NXOpen.BlockStyler.Toggle)theDialog.TopBlock.FindBlock("toggleJiaju");
            selectionJiaju       = (NXOpen.BlockStyler.SelectObject)theDialog.TopBlock.FindBlock("selectionJiaju");
            enum01               = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("enum01");
            groupGeomCopy        = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("groupGeomCopy");
            planeGeomcopy        = (NXOpen.BlockStyler.SpecifyPlane)theDialog.TopBlock.FindBlock("planeGeomcopy");
            groupRotation        = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("groupRotation");
            enumRotation         = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("enumRotation");
            pointAxis            = (NXOpen.BlockStyler.SpecifyPoint)theDialog.TopBlock.FindBlock("pointAxis");
            vector0              = (NXOpen.BlockStyler.SpecifyVector)theDialog.TopBlock.FindBlock("vector0");
            expressionAngle      = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expressionAngle");
            toggleRotationMove   = (NXOpen.BlockStyler.Toggle)theDialog.TopBlock.FindBlock("toggleRotationMove");
            toggleRotationPatter = (NXOpen.BlockStyler.Toggle)theDialog.TopBlock.FindBlock("toggleRotationPatter");
            groupMove            = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("groupMove");
            enum0                    = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("enum0");
            pointStart               = (NXOpen.BlockStyler.SpecifyPoint)theDialog.TopBlock.FindBlock("pointStart");
            pointEnd                 = (NXOpen.BlockStyler.SpecifyPoint)theDialog.TopBlock.FindBlock("pointEnd");
            enumSelectAxis           = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("enumSelectAxis");
            expressionDistance       = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expressionDistance");
            expressionDistanceX      = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expressionDistanceX");
            expressionDistanceY      = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expressionDistanceY");
            expressionDistanceZ      = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expressionDistanceZ");
            toggleMoveRotation       = (NXOpen.BlockStyler.Toggle)theDialog.TopBlock.FindBlock("toggleMoveRotation");
            toggleMovePatter         = (NXOpen.BlockStyler.Toggle)theDialog.TopBlock.FindBlock("toggleMovePatter");
            group                    = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group");
            vectorPatter             = (NXOpen.BlockStyler.SpecifyVector)theDialog.TopBlock.FindBlock("vectorPatter");
            expressionPatterSum      = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expressionPatterSum");
            expressionPatterDistance = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expressionPatterDistance");
        }
        catch (Exception ex)
        {
            //---- Enter your exception handling code here -----
            theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString());
        }
    }
예제 #4
0
        //------------------------------------------------------------------------------
        //---------------------Block UI Styler Callback Functions--------------------------
        //------------------------------------------------------------------------------

        //------------------------------------------------------------------------------
        //Callback Name: initialize_cb
        //------------------------------------------------------------------------------
        public void initialize_cb()
        {
            try
            {
                group0          = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group0");
                type            = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("type");
                group           = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group");
                selectObject    = (NXOpen.BlockStyler.SelectObject)theDialog.TopBlock.FindBlock("selectObject");
                manip           = (NXOpen.BlockStyler.SpecifyOrientation)theDialog.TopBlock.FindBlock("manip");
                vector          = (NXOpen.BlockStyler.SpecifyVector)theDialog.TopBlock.FindBlock("vector");
                group1          = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group1");
                boolOffset      = (NXOpen.BlockStyler.Toggle)theDialog.TopBlock.FindBlock("boolOffset");
                dimOffset       = (NXOpen.BlockStyler.LinearDimension)theDialog.TopBlock.FindBlock("dimOffset");
                group5          = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group5");
                positiveX       = (NXOpen.BlockStyler.LinearDimension)theDialog.TopBlock.FindBlock("positiveX");
                negativeX       = (NXOpen.BlockStyler.LinearDimension)theDialog.TopBlock.FindBlock("negativeX");
                positiveY       = (NXOpen.BlockStyler.LinearDimension)theDialog.TopBlock.FindBlock("positiveY");
                negativeY       = (NXOpen.BlockStyler.LinearDimension)theDialog.TopBlock.FindBlock("negativeY");
                negativeZ       = (NXOpen.BlockStyler.LinearDimension)theDialog.TopBlock.FindBlock("negativeZ");
                positiveZ       = (NXOpen.BlockStyler.LinearDimension)theDialog.TopBlock.FindBlock("positiveZ");
                radial          = (NXOpen.BlockStyler.LinearDimension)theDialog.TopBlock.FindBlock("radial");
                group2          = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group2");
                boolHide        = (NXOpen.BlockStyler.Toggle)theDialog.TopBlock.FindBlock("boolHide");
                boolUnite       = (NXOpen.BlockStyler.Toggle)theDialog.TopBlock.FindBlock("boolUnite");
                boolPlane       = (NXOpen.BlockStyler.Toggle)theDialog.TopBlock.FindBlock("boolPlane");
                boolSurface     = (NXOpen.BlockStyler.Toggle)theDialog.TopBlock.FindBlock("boolSurface");
                group3          = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group3");
                intTranslucency = (NXOpen.BlockStyler.IntegerBlock)theDialog.TopBlock.FindBlock("intTranslucency");
                intLayer        = (NXOpen.BlockStyler.IntegerBlock)theDialog.TopBlock.FindBlock("intLayer");
                intColor        = (NXOpen.BlockStyler.ObjectColorPicker)theDialog.TopBlock.FindBlock("intColor");
                group4          = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group4");
                bttPreview      = (NXOpen.BlockStyler.Button)theDialog.TopBlock.FindBlock("bttPreview");
                strPreview      = (NXOpen.BlockStyler.Label)theDialog.TopBlock.FindBlock("strPreview");
                #region  择过滤
                Selection.MaskTriple maskFace = new Selection.MaskTriple() //面
                {
                    Type             = 70,
                    Subtype          = 2,
                    SolidBodySubtype = UFConstants.UF_UI_SEL_FEATURE_ANY_FACE
                };
                Selection.MaskTriple maskPoint = new Selection.MaskTriple() //点
                {
                    Type             = 2,
                    Subtype          = 0,
                    SolidBodySubtype = 0
                };
                Selection.MaskTriple maskCurve = new Selection.MaskTriple() //线
                {
                    Type             = 3,
                    Subtype          = 0,
                    SolidBodySubtype = 0
                };
                Selection.MaskTriple maskEdge = new Selection.MaskTriple() //边
                {
                    Type             = 70,
                    Subtype          = 3,
                    SolidBodySubtype = UFConstants.UF_UI_SEL_FEATURE_ANY_EDGE
                };

                Selection.MaskTriple[] masks = { maskFace, maskPoint, maskCurve, maskEdge };
                selectObject.SetSelectionFilter(Selection.SelectionAction.ClearAndEnableSpecific, masks);//过滤只选择点和面
                #endregion


                SetLinearDimensionShow(false);
                radial.Show = false;
            }
            catch (Exception ex)
            {
                //---- Enter your exception handling code here -----
                theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString());
            }
        }