<?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: How to get available table styles in a document in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/how-to-get-available-table-styles-in-a-document/m-p/3080810#M60254</link>
    <description>&lt;P&gt;Great, thank you for your quick response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And another question, how do I apply the acadTableStyle to the acadTable I have just created&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Dim acTableStyle As AcadTableStyle = GetTableStyle(acDoc)
Dim acTable As AcadTable = acDoc.ModelSpace.AddTable(acPoint, DocumentsInfo.Count + 1, 7, acTableStyle.GetTextHeight(AcRowType.acDataRow) * 1.05, 20)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;unlike TextStyle the acadDocument&amp;nbsp;don't&amp;nbsp;have a ActiveTableStlye property.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Jul 2011 10:08:05 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-07-05T10:08:05Z</dc:date>
    <item>
      <title>How to get available table styles in a document</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-get-available-table-styles-in-a-document/m-p/3080568#M60252</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm new for developing for AutoCAD.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am building a COM interop using visual basic .NET&lt;/P&gt;&lt;P&gt;I've managed to add a new table, I wish to give the user an option to choose which table style to apply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just cannot find how to get the document's available&amp;nbsp;﻿table styles.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm developing for AutoCAD 2012, if it matters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jul 2011 23:29:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-get-available-table-styles-in-a-document/m-p/3080568#M60252</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-07-04T23:29:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to get available table styles in a document</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-get-available-table-styles-in-a-document/m-p/3080730#M60253</link>
      <description>&lt;PRE&gt;#Region "Table Styles"

    &amp;lt;CommandMethod("demo", CommandFlags.Modal Or CommandFlags.Session)&amp;gt; _ 
    Public Sub ShowTableStyles()
        'get the acad application object
        Dim acApp As AcadApplication = Application.AcadApplication ''New AcadApplication
        Try
            acApp.Visible = True
            ' get activedocument object
            Dim acDoc As Autodesk.AutoCAD.Interop.AcadDocument = acApp.ActiveDocument
            'get utilituy object
            Dim acUtil As AcadUtility = acDoc.Utility
            ' get a table style dictionary object
            Dim tblDict As AcadDictionary = acDoc.Dictionaries.Item("ACAD_TABLESTYLE")
            Dim tblStl As AcadTableStyle
            Dim msg As String = String.Empty
            'loop through dictionary
            'dispaly style in the command line
            For Each tblStl In tblDict
                acUtil.Prompt(vbLf &amp;amp; tblStl.Name &amp;amp; vbLf)
            Next
        Catch ex As Exception
            MsgBox(ex.Message &amp;amp; vbLf &amp;amp; ex.StackTrace)
            acApp.Quit()
            acApp = Nothing
        End Try

    End Sub
#End Region&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2011 07:36:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-get-available-table-styles-in-a-document/m-p/3080730#M60253</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2011-07-05T07:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to get available table styles in a document</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-get-available-table-styles-in-a-document/m-p/3080810#M60254</link>
      <description>&lt;P&gt;Great, thank you for your quick response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And another question, how do I apply the acadTableStyle to the acadTable I have just created&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Dim acTableStyle As AcadTableStyle = GetTableStyle(acDoc)
Dim acTable As AcadTable = acDoc.ModelSpace.AddTable(acPoint, DocumentsInfo.Count + 1, 7, acTableStyle.GetTextHeight(AcRowType.acDataRow) * 1.05, 20)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;unlike TextStyle the acadDocument&amp;nbsp;don't&amp;nbsp;have a ActiveTableStlye property.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2011 10:08:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-get-available-table-styles-in-a-document/m-p/3080810#M60254</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-07-05T10:08:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to get available table styles in a document</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-get-available-table-styles-in-a-document/m-p/3080908#M60255</link>
      <description>&lt;P&gt;Never mind, I've Found it.&lt;/P&gt;&lt;P&gt;Thank's anyway&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2011 12:36:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-get-available-table-styles-in-a-document/m-p/3080908#M60255</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-07-05T12:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to get available table styles in a document</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-get-available-table-styles-in-a-document/m-p/3080916#M60256</link>
      <description>&lt;P&gt;You&amp;nbsp;have to&amp;nbsp;use the system variable "CTABLESTYLE"&lt;/P&gt;&lt;P&gt;See help file&lt;/P&gt;&lt;P&gt;Something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="arial,helvetica,sans-serif"&gt;acDoc.SetVariable("CTABLESTYLE", "MyTableStyle")&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="arial,helvetica,sans-serif"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="arial,helvetica,sans-serif"&gt;Dim acTable AsAcadTable = acDoc.ModelSpace.AddTable(acPoint, 10, 7, _&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="arial,helvetica,sans-serif"&gt;_&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="arial,helvetica,sans-serif"&gt;&amp;nbsp;acTableStyle.GetTextHeight(AcRowType.acDataRow) * 1.05, 20)&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2011 12:45:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-get-available-table-styles-in-a-document/m-p/3080916#M60256</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2011-07-05T12:45:17Z</dc:date>
    </item>
  </channel>
</rss>

