private void btnSelBlockAndAtt_Click(object sender, EventArgs e)
        {
            if (_SelBlockAndAttShield)
            {
                return;
            }
            try
            {
                _SelBlockAndAttShield = true;

                Globs.CancelCommand();

                Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.SendStringToExecute("Plan2HoePrSelHkBlockAndAtt ", true, false, false);
            }
            catch (Exception ex)
            {
                Autodesk.AutoCAD.ApplicationServices.Application.ShowAlertDialog(ex.Message);
            }
            finally
            {
                _SelBlockAndAttShield = false;
            }
        }
Exemple #2
0
        private void btnResetCheck_Click(object sender, EventArgs e)
        {
            if (_ResetCheckShield)
            {
                return;
            }
            try
            {
                _ResetCheckShield = true;

                Globs.CancelCommand();

                _AcAp.Application.DocumentManager.MdiActiveDocument.SendStringToExecute("Plan2HoePrResetCheck ", true, false, false);
            }
            catch (Exception ex)
            {
                _AcAp.Application.ShowAlertDialog(ex.Message);
            }
            finally
            {
                _ResetCheckShield = false;
            }
        }
        public static bool Plan2HoePrMarkAsOk(ResultBuffer rb)
        {
            Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;

            try
            {
                if (rb == null)
                {
                    ed.WriteMessage("\nAufruf: (Plan2HoePrMarkAsOk Entity YesNo)");
                    return(false);
                }
                TypedValue[] values = rb.AsArray();
                if (values == null || values.Length < 2 || values[0].Value == null)
                {
                    ed.WriteMessage("\nAufruf: (Plan2HoePrMarkAsOk Entity YesNo)");
                    return(false);
                }

                var      val = values[0].Value;
                ObjectId oid = (ObjectId)val;


                var  val2   = values[1].Value;
                bool markIt = (int)values[1].TypeCode == (int)LispDataType.T_atom;

                ResultBuffer resbuf = new ResultBuffer(new TypedValue((int)DxfCode.Bool, markIt));
                Globs.SetXrecord(oid, Engine.HOEPR_OK_DICT_NAME, resbuf);

                return(true);
            }
            catch (System.Exception ex)
            {
                ed.WriteMessage(string.Format(CultureInfo.CurrentCulture, "\nFehler in Plan2HoePrMarkAsOk! {0}'", ex.Message));
            }
            return(false);
        }