예제 #1
0
            private bool GetRaumHoehe(Entity ent, out double height)
            {
                height = 0.0;
                string hText = string.Empty;

                BlockReference raumBlock = ent as BlockReference;

                if (raumBlock != null)
                {
                    var att = GetBlockAttribute(HoePrOptions.AttHoehe, raumBlock);
                    if (att == null)
                    {
                        log.WarnFormat("Attribut '{0}' nicht gefunden!", HoePrOptions.AttHoehe);
                        return(true);
                    }

                    hText = att.TextString;
                }
                else
                {
                    DBText text = (DBText)ent;
                    hText = text.TextString;
                }

                if (string.IsNullOrEmpty(hText.Trim()))
                {
                    return(false);
                }

                if (Globs.GetFirstDoubleInText(hText, out height))
                {
                    return(true);
                }
                else
                {
                    log.WarnFormat("Konnte Höhe nicht ermitteln aus '{0}'! Verwende 0.0", hText);
                    return(true);
                }
            }
예제 #2
0
        private void btnSelBlockAndAtt_Click(object sender, EventArgs e)
        {
            if (_SelBlockAndAttShield)
            {
                return;
            }
            try
            {
                _SelBlockAndAttShield = true;

                Globs.CancelCommand();

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

                Globs.CancelCommand();

                _AcAp.Application.DocumentManager.MdiActiveDocument.SendStringToExecute("Plan2RaumHoePrReset ", true, false, false);
            }
            catch (Exception ex)
            {
                _AcAp.Application.ShowAlertDialog(ex.Message);
            }
            finally
            {
                _ResetCheckShield = false;
            }
        }