1

I'm trying to scale a table generated by my AutoCAD plugin. However the following code

public void formatCells()
    {
        Transaction tr = doc.TransactionManager.StartTransaction();
        DocumentLock docLock = doc.LockDocument();
        using (tr)
        using (docLock)
        {
            if (!IsWriteEnabled || !IsReadEnabled) //Committing transactions closes everything for reading and writing so it must be reopened
            {
                tr.GetObject(this.ObjectId, OpenMode.ForRead);
                tr.GetObject(this.ObjectId, OpenMode.ForWrite);
            }
            TransformBy(Matrix3d.Scaling(20, Position));
            SetTextHeight(20, 7);
            SetAlignment(CellAlignment.MiddleCenter, 1); //Sets alignment to middle center
            SetRowHeight(3); //Sets height of new row
            SetColumnWidth(8); //Sets width of new columns

            tr.Commit();
        }
    }

Produces the result shown in the image below. How do I make the table look better instead of the mess it currently is?

enter image description here

John Saunders
  • 160,644
  • 26
  • 247
  • 397
Nick Gilbert
  • 4,159
  • 8
  • 43
  • 90
  • Define "mess" because that looks like a valid table to me. Do you want to prevent the vertical text in the second row? – Omaha Dec 04 '14 at 20:13
  • Yes, I'm trying to make the table look normal with single row text and without the excess whitespace – Nick Gilbert Dec 04 '14 at 20:15

0 Answers0