how to create text in front view drawing using c#

how to create text in front view drawing using c#

Anonymous
Not applicable
507 Views
0 Replies
Message 1 of 1

how to create text in front view drawing using c#

Anonymous
Not applicable

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);

 

 

0 Likes
508 Views
0 Replies
Replies (0)