Its possible. Here is some code that does it. It iterates through all the
LineWeights and makes a sample line of each, along with a Text label. You
won't be able to run it directly unless you download the sample project
"MgdDbg" that has been posted here earlier, but it does show the basic
steps. (Not sure why I can't get the formatting to look decent when I paste
in a code sample, but hopefully you can read it).
public void
Lineweights()
{
using (CompBldrCurSpace compBldr = new CompBldrCurSpace(m_db)) {
compBldr.Start();
compBldr.PushXform(Utils.Db.GetUcsMatrix(m_db));
Point3d startPt = new Point3d(0.0, 0.0, 0.0);
Point3d endPt = new Point3d(100.0, 0.0, 0.0);
Vector3d offset = new Vector3d(0.0, 10.0, 0.0);
foreach (LineWeight lw in System.Enum.GetValues(typeof(LineWeight)))
{
Line line = new Line(startPt, endPt);
line.LineWeight = lw;
compBldr.AddToDb(line);
DBText text = new DBText();
text.Height = 5.0;
text.Position = endPt;
text.TextString = lw.ToString();
compBldr.AddToDb(text);
startPt += offset;
endPt += offset;
}
compBldr.Commit();
}
}
Jim Awe
Autodesk, Inc.
"RolandF" wrote in message
news:13450479.1112857470269.JavaMail.jive@jiveforum1.autodesk.com...
> How can i insert a Text (and not a MText) with .NET?
> I think it is not possible, right?
>
> Roland