Exemplo n.º 1
0
        private void insertReinforcmentMark(string mark, G.Point IP)
        {
            string layerName = "K023TL";
            string styleName = "dmt_M" + (int)Math.Round(L._V_.Z_DRAWING_SCALE);

            textStyleHandler();
            blockHandler();
            leaderStyleHandler(styleName, (int)Math.Round(L._V_.Z_DRAWING_SCALE));

            _Db.DBDictionary mleaderStyleTable = _c.trans.GetObject(_c.db.MLeaderStyleDictionaryId, _Db.OpenMode.ForWrite) as _Db.DBDictionary;

            _Ge.Point3d insertPointLeader = new _Ge.Point3d(IP.X, IP.Y, 0);
            _Ge.Point3d insertPointText   = new _Ge.Point3d(IP.X + 7.5 * L._V_.Z_DRAWING_SCALE, IP.Y + 7.5 * L._V_.Z_DRAWING_SCALE, 0);

            _Db.MText mText = new _Db.MText();
            mText.SetDatabaseDefaults();
            mText.Contents = mark;

            _Db.MLeader leader = new _Db.MLeader();
            leader.SetDatabaseDefaults();
            leader.ContentType = _Db.ContentType.MTextContent;
            leader.MText       = mText;
            leader.AddLeaderLine(insertPointLeader);
            leader.TextLocation = insertPointText;
            leader.MLeaderStyle = mleaderStyleTable.GetAt(styleName);

            leader.Layer = layerName;

            _c.modelSpace.AppendEntity(leader);
            _c.trans.AddNewlyCreatedDBObject(leader, true);
        }
Exemplo n.º 2
0
        private void insertText(_Ge.Point3d ip, string txt, double scale)
        {
            _Db.MText mText = new _Db.MText();
            mText.SetDatabaseDefaults();
            mText.TextHeight = 2.5 * scale;
            mText.Contents   = txt;
            mText.Location   = ip;

            _c.modelSpace.AppendEntity(mText);
            _c.trans.AddNewlyCreatedDBObject(mText, true);
        }