<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Table object in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/table-object/m-p/3044308#M60662</link>
    <description>&lt;P&gt;I haven't have this version on my machine sorry&lt;/P&gt;&lt;P&gt;Try other function from my old project&lt;/P&gt;&lt;P&gt;perhaps it will do your work&lt;/P&gt;&lt;PRE&gt;     public void FillCell(Table oTable, string value, int row, int column,
           ObjectId id, double height, CellAlignment cellalign, double topmargin, double bottommargin,
            double leftmargin, double rightmargin)
        {
            oTable.SetTextString(row, column, value);

            oTable.SetTextHeight(row, column, height);

            oTable.SetTextStyle(row, column, id);

            oTable.SetAlignment(row, column, cellalign);

            oTable.SetMargin(row, column, CellMargins.Bottom, bottommargin);

            oTable.SetMargin(row, column, CellMargins.Top, topmargin);

            oTable.SetMargin(row, column, CellMargins.Left, leftmargin);

            oTable.SetMargin(row, column, CellMargins.Right, rightmargin);
        }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 02 Jun 2011 11:30:41 GMT</pubDate>
    <dc:creator>Hallex</dc:creator>
    <dc:date>2011-06-02T11:30:41Z</dc:date>
    <item>
      <title>Table object</title>
      <link>https://forums.autodesk.com/t5/net-forum/table-object/m-p/3044152#M60659</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good Day!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a table with 2rows &amp;amp; 2columns with a title.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do some search here and google and i can not find perfect instruction about table.&lt;/P&gt;&lt;P&gt;Because now i can not use noofroes &amp;amp; noofcolumns methods.&lt;/P&gt;&lt;P&gt;and also i can not use mytable.cells(row,column).value="xxx".&lt;/P&gt;&lt;P&gt;those are absolute.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone have piece of code to create a simple table using latest api?&lt;/P&gt;&lt;P&gt;It helps more for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2011 06:18:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/table-object/m-p/3044152#M60659</guid>
      <dc:creator>ProfWolfMan</dc:creator>
      <dc:date>2011-06-02T06:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: Table object</title>
      <link>https://forums.autodesk.com/t5/net-forum/table-object/m-p/3044154#M60660</link>
      <description>&lt;P&gt;Try this function&lt;/P&gt;&lt;PRE&gt;        public static void SetCell(Table oTable, int row, int column, string value,
           double height, CellAlignment cellalign)
        {
            //oTable.SetTextString(row, column, value);//&amp;lt;A2010
            oTable.Cells[row, column].TextString = value;//A2010

            // oTable.SetTextHeight(row, column, height);//&amp;lt;A2010
            oTable.Cells[row, column].TextHeight = height;//A2010

            //oTable.SetAlignment(row, column, cellalign);//&amp;lt;A2010
            oTable.Cells[row, column].Alignment = cellalign;//A2010

        }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2011 06:33:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/table-object/m-p/3044154#M60660</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2011-06-02T06:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: Table object</title>
      <link>https://forums.autodesk.com/t5/net-forum/table-object/m-p/3044156#M60661</link>
      <description>&lt;P&gt;Hi Hallex,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;When i try to attempt table.cells() method following error occurs.&lt;/P&gt;&lt;P&gt;(image attached)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Method not found: 'Autodesk.AutoCAD.DatabaseServices.CellRange &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Autodesk.AutoCAD.DatabaseServices.Table.get_Cells()'﻿&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using AutoCAD2008 &amp;amp; VS2005. Below is a snippet.&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;'create table&lt;/P&gt;&lt;P&gt;Dim PJtbl As New Table&lt;/P&gt;&lt;P&gt;PJtbl.InsertRows(0, 10, 1)&lt;/P&gt;&lt;P&gt;PJtbl.InsertRowsAndInherit(1, 0, 5)&lt;/P&gt;&lt;P&gt;PJtbl.InsertColumns(0, 25, 1)&lt;/P&gt;&lt;P&gt;'assign value&lt;/P&gt;&lt;P&gt;PJtbl.Cells(0, 0).TextString = rowvalues(0)﻿&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2011 07:00:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/table-object/m-p/3044156#M60661</guid>
      <dc:creator>ProfWolfMan</dc:creator>
      <dc:date>2011-06-02T07:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: Table object</title>
      <link>https://forums.autodesk.com/t5/net-forum/table-object/m-p/3044308#M60662</link>
      <description>&lt;P&gt;I haven't have this version on my machine sorry&lt;/P&gt;&lt;P&gt;Try other function from my old project&lt;/P&gt;&lt;P&gt;perhaps it will do your work&lt;/P&gt;&lt;PRE&gt;     public void FillCell(Table oTable, string value, int row, int column,
           ObjectId id, double height, CellAlignment cellalign, double topmargin, double bottommargin,
            double leftmargin, double rightmargin)
        {
            oTable.SetTextString(row, column, value);

            oTable.SetTextHeight(row, column, height);

            oTable.SetTextStyle(row, column, id);

            oTable.SetAlignment(row, column, cellalign);

            oTable.SetMargin(row, column, CellMargins.Bottom, bottommargin);

            oTable.SetMargin(row, column, CellMargins.Top, topmargin);

            oTable.SetMargin(row, column, CellMargins.Left, leftmargin);

            oTable.SetMargin(row, column, CellMargins.Right, rightmargin);
        }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2011 11:30:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/table-object/m-p/3044308#M60662</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2011-06-02T11:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: Table object</title>
      <link>https://forums.autodesk.com/t5/net-forum/table-object/m-p/3045444#M60663</link>
      <description>&lt;P&gt;Sorry!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am out of luck.&lt;/P&gt;&lt;P&gt;API says table.setstring() is obsolute.&lt;/P&gt;&lt;P&gt;I am keep trying to solve it.&lt;/P&gt;&lt;P&gt;Thanks for your valuable time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Meanwhile, anyone knows to create a simple table &amp;amp; assign values in AutoCAD2011?&lt;/P&gt;&lt;P&gt;Table API changed lot from its previous.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please share.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jun 2011 00:43:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/table-object/m-p/3045444#M60663</guid>
      <dc:creator>ProfWolfMan</dc:creator>
      <dc:date>2011-06-03T00:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: Table object</title>
      <link>https://forums.autodesk.com/t5/net-forum/table-object/m-p/3045658#M60664</link>
      <description>&lt;P&gt;From here &lt;A target="_blank" href="http://www.theswamp.org/index.php?topic=37061.msg420539#msg420539"&gt;http://www.theswamp.org/index.php?topic=37061.msg420539#msg420539&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Took out tuples and blocks in link works for 2011 and 2012&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;            [CommandMethod("CreateTable")]
            public void CreateTable()
            {

                Document doc = Application.DocumentManager.MdiActiveDocument;
                Database db = doc.Database;
                Editor ed = doc.Editor;

                using (Transaction trx = db.TransactionManager.StartTransaction())
                {
                    BlockTable bt = db.BlockTableId.GetObject(OpenMode.ForRead) as BlockTable;

                    BlockTableRecord btrMs = (BlockTableRecord)bt[BlockTableRecord.ModelSpace].GetObject(OpenMode.ForRead);



                    Table tbl = new Table();
                    tbl.TableStyle = db.Tablestyle;
                    tbl.Position = Point3d.Origin;

                    TableStyle ts = (TableStyle)trx.GetObject(tbl.TableStyle, OpenMode.ForRead);
                    double txtheight = ts.TextHeight(RowType.DataRow);

                    tbl.Cells[0, 0].TextString = "Title";
                    tbl.InsertRows(1, 1, 1);
                    tbl.Rows[1].Style = "Data";
                    tbl.InsertRowsAndInherit(1, 1, 3);
                    tbl.InsertColumnsAndInherit(1, 0, 1);




                    for (int i = 1; i &amp;lt;= 3; i++)
                    {
                        tbl.Cells[i, 0].Contents.Add();
                        tbl.Cells[i, 0].Contents[0].TextString = "dfdrdrrerd";
                        tbl.Cells[i, 1].Value = "hgjhgjjg";
                    }

                    tbl.GenerateLayout();

                    btrMs.UpgradeOpen();
                    btrMs.AppendEntity(tbl);
                    trx.AddNewlyCreatedDBObject(tbl, true);

                    trx.Commit();
                }
            }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jun 2011 09:59:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/table-object/m-p/3045658#M60664</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-06-03T09:59:09Z</dc:date>
    </item>
  </channel>
</rss>

