how to create text in front view drawing using c#
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, I am creating text using c# is is working fine if view is normal but when drawing is created in front view model the text is displaying as a line only so please suggest how can i make readable text in front view or right view.i am using below code.
Database acCurDb = acDoc.Database;
// Start a transaction
BlockTable acBlkTbl;
acBlkTbl = acTrans.GetObject(acCurDb.BlockTableId, OpenMode.ForRead) as BlockTable;
// Open the Block table record Model space for write
BlockTableRecord acBlkTblRec;
acBlkTblRec = acTrans.GetObject(acBlkTbl[BlockTableRecord.ModelSpace], OpenMode.ForWrite) as BlockTableRecord;
// Create a single-line text object
DBText acText = new DBText();
acText.SetDatabaseDefaults();
acText.Justify = AttachmentPoint.MiddleCenter;
// acText.Position = Position;
acText.AlignmentPoint = Position;
acText.Height = Height;
acText.TextString = TextString;
acBlkTblRec.AppendEntity(acText);
acText.Layer = layername;
//acText.Color = Color.FromEntityColor(ColorIndex);
acText.Color = Color.FromColorIndex(ColorMethod.ByColor, ColorIndex);