I am currently adding a textelemt to the Diagram via the automation interface.
The problem i am having is changing the width of the textelement.
Below is my code, please help
Thanks

//Create new Text Element
textElement = (EA.Element)parentPackage.Elements.AddNew("CustomerName", "Text");
textElement.Locked = false;
textElement.Visibility.PadLeft(clsHelper.CompanyName.Length + 10);
textElement.Notes = "<b><font>" + clsHelper.CompanyName + "</font></b>";
textElement.SetAppearance(1, 0, ColorTranslator.ToWin32(Color.Teal));
textElement.SetAppearance(1, 1, ColorTranslator.ToWin32(Color.White));
textElement.SetAppearance(1, 2, ColorTranslator.ToWin32(Color.Transparent));
textElement.Update();
//Place the new text element on the diagram
dobj = (EA.DiagramObject)newDiagram.DiagramObjects.AddNew("l=20;r=150;t=20;b=45;", "");
dobj.ElementID = textElement.ElementID;
dobj.Update();
dobj.bottom = 0;
dobj.top = 0;
dobj.left = 100;