Active Member
Posts: 7
Registered: ‎06-21-2011
Message 1 of 9 (300 Views)
Accepted Solution

Can't insert MText into some DWG files

300 Views, 8 Replies
02-13-2012 09:57 AM



I've got a problem with inserting MText into drawings.


The code below works perfectly in new file (AutoCAD 2012 and in some files, but in some other files the MText field just doesn't show.

There's no exception thrown, no error messages, debugging shows everything is OK.


How to check, what is wrong?

I mean - what's the difference between those files which I can't insert MText into and those, which I can?


The test code:


public void wtest3()
    acApp.Document doc = acApp.Application.DocumentManager.MdiActiveDocument;
    Database db = doc.Database;
    Editor ed = doc.Editor;

    PromptPointOptions getPointOptions = new PromptPointOptions("Click the point for MText");
    PromptPointResult getPointResult = ed.GetPoint(getPointOptions);
    if (getPointResult.Status != PromptStatus.OK)

    Transaction tr = db.TransactionManager.StartTransaction();
        BlockTable bt = (BlockTable)tr.GetObject(db.BlockTableId