Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/311.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 使用C正确缩放AutoCAD表格#_C#_.net_Autocad Plugin - Fatal编程技术网

C# 使用C正确缩放AutoCAD表格#

C# 使用C正确缩放AutoCAD表格#,c#,.net,autocad-plugin,C#,.net,Autocad Plugin,我正在尝试缩放由AutoCAD插件生成的表。然而,下面的代码 public void formatCells() { Transaction tr = doc.TransactionManager.StartTransaction(); DocumentLock docLock = doc.LockDocument(); using (tr) using (docLock) { if

我正在尝试缩放由AutoCAD插件生成的表。然而,下面的代码

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();
        }
    }
生成下图所示的结果。如何使桌子看起来更好,而不是像现在这样乱七八糟


定义“混乱”,因为我认为这是一个有效的表格。是否要阻止第二行中的垂直文本?是的,我正在尝试使用单行文本使表格看起来正常,并且没有多余的空白