示例#1
0
    //------------------------------------------------------------------------------
    //---------------------Block UI Styler Callback Functions--------------------------
    //------------------------------------------------------------------------------

    //------------------------------------------------------------------------------
    //Callback Name: initialize_cb
    //------------------------------------------------------------------------------
    public void initialize_cb()
    {
        try
        {
            face_select0       = (NXOpen.BlockStyler.FaceCollector)theDialog.TopBlock.FindBlock("face_select0");
            group              = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group");
            elecName           = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("elecName");
            expressionQingGen  = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expressionQingGen");
            expressionDistance = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expressionDistance");
            expressionJizhutai = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expressionJizhutai");
            expressionDaojiao  = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expressionDaojiao");
            expressionDaoyuan  = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expressionDaoyuan");
            toggleAutoInteger  = (NXOpen.BlockStyler.Toggle)theDialog.TopBlock.FindBlock("toggleAutoInteger");
            expressionX        = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expressionX");
            expressionY        = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expressionY");
            expressionZ        = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expressionZ");
            group1             = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group1");
            enum0              = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("enum0");
        }
        catch (Exception ex)
        {
            //---- Enter your exception handling code here -----
            theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString());
        }
    }
示例#2
0
    //------------------------------------------------------------------------------
    //---------------------Block UI Styler Callback Functions--------------------------
    //------------------------------------------------------------------------------

    //------------------------------------------------------------------------------
    //Callback Name: initialize_cb
    //------------------------------------------------------------------------------
    public void initialize_cb()
    {
        try
        {
            face_select0        = (NXOpen.BlockStyler.FaceCollector)theDialog.TopBlock.FindBlock("face_select0");
            enum0               = (NXOpen.BlockStyler.Enumeration)theDialog.TopBlock.FindBlock("enum0");
            expressionXPositive = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expressionXPositive");
            expressionXNegative = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expressionXNegative");
            expressionYPositive = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expressionYPositive");
            expressionYNegative = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expressionYNegative");
            expressionZPositive = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expressionZPositive");
            expressionZNegative = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expressionZNegative");
            expressionALL       = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expressionALL");
        }
        catch (Exception ex)
        {
            //---- Enter your exception handling code here -----
            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
        {
            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());
        }
    }
示例#4
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());
        }
    }
示例#5
0
    //------------------------------------------------------------------------------
    //---------------------Block UI Styler Callback Functions--------------------------
    //------------------------------------------------------------------------------

    //------------------------------------------------------------------------------
    //Callback Name: initialize_cb
    //------------------------------------------------------------------------------
    public void initialize_cb()
    {
        try
        {
            group0                = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group0");
            tree_control0         = (NXOpen.BlockStyler.Tree)theDialog.TopBlock.FindBlock("tree_control0");
            btnNew                = (NXOpen.BlockStyler.Button)theDialog.TopBlock.FindBlock("btnNew");
            btnSave               = (NXOpen.BlockStyler.Button)theDialog.TopBlock.FindBlock("btnSave");
            btnDelete             = (NXOpen.BlockStyler.Button)theDialog.TopBlock.FindBlock("btnDelete");
            group                 = (NXOpen.BlockStyler.Group)theDialog.TopBlock.FindBlock("group");
            drawingArea0          = (NXOpen.BlockStyler.DrawingArea)theDialog.TopBlock.FindBlock("drawingArea0");
            strProbeName          = (NXOpen.BlockStyler.StringBlock)theDialog.TopBlock.FindBlock("strProbeName");
            strProbeAB            = (NXOpen.BlockStyler.MultilineString)theDialog.TopBlock.FindBlock("strProbeAB");
            expSphereRadius       = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expSphereRadius");
            expArrowRadius        = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expArrowRadius");
            expArrowLength        = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expArrowLength");
            expExtensionBarRadius = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expExtensionBarRadius");
            expExtensionBarLength = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expExtensionBarLength");
            expHeadRadius         = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expHeadRadius");
            expHeadLength         = (NXOpen.BlockStyler.ExpressionBlock)theDialog.TopBlock.FindBlock("expHeadLength");
            //------------------------------------------------------------------------------
            //Registration of Treelist specific callbacks
            //------------------------------------------------------------------------------
            //tree_control0.SetOnExpandHandler(new NXOpen.BlockStyler.Tree.OnExpandCallback(OnExpandCallback));

            //tree_control0.SetOnInsertColumnHandler(new NXOpen.BlockStyler.Tree.OnInsertColumnCallback(OnInsertColumnCallback));

            //tree_control0.SetOnInsertNodeHandler(new NXOpen.BlockStyler.Tree.OnInsertNodeCallback(OnInsertNodecallback));

            //tree_control0.SetOnDeleteNodeHandler(new NXOpen.BlockStyler.Tree.OnDeleteNodeCallback(OnDeleteNodecallback));

            //tree_control0.SetOnPreSelectHandler(new NXOpen.BlockStyler.Tree.OnPreSelectCallback(OnPreSelectcallback));

            //tree_control0.SetOnSelectHandler(new NXOpen.BlockStyler.Tree.OnSelectCallback(OnSelectcallback));

            //tree_control0.SetOnStateChangeHandler(new NXOpen.BlockStyler.Tree.OnStateChangeCallback(OnStateChangecallback));

            //tree_control0.SetToolTipTextHandler(new NXOpen.BlockStyler.Tree.ToolTipTextCallback(ToolTipTextcallback));

            //tree_control0.SetColumnSortHandler(new NXOpen.BlockStyler.Tree.ColumnSortCallback(ColumnSortcallback));

            //tree_control0.SetStateIconNameHandler(new NXOpen.BlockStyler.Tree.StateIconNameCallback(StateIconNameCallback));

            //tree_control0.SetOnBeginLabelEditHandler(new NXOpen.BlockStyler.Tree.OnBeginLabelEditCallback(OnBeginLabelEditCallback));

            //tree_control0.SetOnEndLabelEditHandler(new NXOpen.BlockStyler.Tree.OnEndLabelEditCallback(OnEndLabelEditCallback));

            //tree_control0.SetOnEditOptionSelectedHandler(new NXOpen.BlockStyler.Tree.OnEditOptionSelectedCallback(OnEditOptionSelectedCallback));

            //tree_control0.SetAskEditControlHandler(new NXOpen.BlockStyler.Tree.AskEditControlCallback(AskEditControlCallback));

            //tree_control0.SetOnMenuHandler(new NXOpen.BlockStyler.Tree.OnMenuCallback(OnMenuCallback));;

            //tree_control0.SetOnMenuSelectionHandler(new NXOpen.BlockStyler.Tree.OnMenuSelectionCallback(OnMenuSelectionCallback));;

            //tree_control0.SetIsDropAllowedHandler(new NXOpen.BlockStyler.Tree.IsDropAllowedCallback(IsDropAllowedCallback));;

            //tree_control0.SetIsDragAllowedHandler(new NXOpen.BlockStyler.Tree.IsDragAllowedCallback(IsDragAllowedCallback));;

            //tree_control0.SetOnDropHandler(new NXOpen.BlockStyler.Tree.OnDropCallback(OnDropCallback));;

            //tree_control0.SetOnDropMenuHandler(new NXOpen.BlockStyler.Tree.OnDropMenuCallback(OnDropMenuCallback));

            //tree_control0.SetOnDefaultActionHandler(new NXOpen.BlockStyler.Tree.OnDefaultActionCallback(OnDefaultActionCallback));

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