//------------------------------------------------------------------------------
        //Callback Name: update_cb
        //------------------------------------------------------------------------------
        public int update_cb(NXOpen.BlockStyler.UIBlock block)
        {
            try
            {
                if (block == LB_SelObjs)
                {
                    //---------Enter your code here-----------
                    button_Verify.Enable  = LB_SelObjs.GetSelectedItems().Length > 0 ? true : false;
                    button_Verify.Tooltip = button_Verify.Enable ? "" : "Select at least one object to verify";
                }
                else if (block == button_Verify)
                {
                    //---------Enter your code here-----------
                    foreach (int objIndex in LB_SelObjs.GetSelectedItems())
                    {
                        // Get selected object
                        NXOpen.NXObject targObj = theSession.Parts.ToArray()[objIndex];
                        lw.WriteFullline(Environment.NewLine +
                                         targObj.Name.ToUpper());

                        // Check if CAD object
                        if (targObj.GetType().ToString() != "NXOpen.Part")
                        {
                            lw.WriteFullline("   -> Skipped:  not a CAD object, but of type = " + targObj.GetType().ToString());
                            continue;
                        }

                        NXOpen.Part targCAD = (NXOpen.Part)targObj;

                        // Check if target CAD object is a Sheet Metal object
                        if (DetectSheetMetal(targCAD))
                        {
                            lw.WriteFullline("   -> SHEETMETAL");
                        }
                        else
                        {
                            lw.WriteFullline("   -> normal CAD");
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                //---- Enter your exception handling code here -----
                theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString());
            }
            return(0);
        }
        //------------------------------------------------------------------------------
        //Callback Name: update_cb
        //------------------------------------------------------------------------------
        public int update_cb(NXOpen.BlockStyler.UIBlock block)
        {
            try
            {
                if (block == LB_Solutions)
                {
                    // ...
                }
                else if (block == button_SelectAll)
                {
                    if (!allSelected)
                    {
                        // SELECT ALL
                        LB_Solutions.SetSelectedItems(Enumerable.Range(0, mySolutions.Count).ToArray());

                        // Adjust button label
                        button_SelectAll.Label = "Deselect all";
                        allSelected            = true;
                    }
                    else
                    {
                        // DESELECT ALL
                        LB_Solutions.SetSelectedItems(new List <int>().ToArray());

                        // Adjust button label
                        button_SelectAll.Label = "Select all";
                        allSelected            = false;
                    }
                }
                else if (block == separator0)
                {
                    //---------Enter your code here-----------
                }
                else if (block == BTN_Generate)
                {
                    // GET SELECTED SOLUTIONS
                    mySelectedSolutions.Clear();

                    foreach (int index in LB_Solutions.GetSelectedItems())
                    {
                        mySelectedSolutions.Add(mySolutions[index]);
                    }

                    // GENERATE CPP RESULT PROBES
                    ProbeGenerator myProbeGenerator = new ProbeGenerator();
                    myProbeGenerator.GenerateCPPResultProbes(mySelectedSolutions, mySIM);

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