Ejemplo n.º 1
0
    //------------------------------------------------------------------------------
    //---------------------Block UI Styler Callback Functions--------------------------
    //------------------------------------------------------------------------------

    //------------------------------------------------------------------------------
    //Callback Name: initialize_cb
    //------------------------------------------------------------------------------
    public void initialize_cb()
    {
        try
        {
            group          = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group");
            bodySelect0    = (NXOpen.BlockStyler.SelectObject)theDialog.TopBlock.FindBlock("bodySelect0");
            plane0         = (NXOpen.BlockStyler.SpecifyPlane)theDialog.TopBlock.FindBlock("plane0");
            stringElecName = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("stringElecName");
            toggleJiaju    = (NXOpen.BlockStyler.Toggle)theDialog.TopBlock.FindBlock("toggleJiaju");
            selectionJiaju = (NXOpen.BlockStyler.SelectObject)theDialog.TopBlock.FindBlock("selectionJiaju");
            toggle0        = (NXOpen.BlockStyler.Toggle)theDialog.TopBlock.FindBlock("toggle0");
            groupXYZ       = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("groupXYZ");
            expressionX    = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expressionX");
            expressionY    = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expressionY");
            expressionZ    = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expressionZ");
        }
        catch (Exception ex)
        {
            //---- Enter your exception handling code here -----
            theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString());
        }
    }
Ejemplo n.º 2
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());
        }
    }