<?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: List all available plot styles with .NET API in Civil 3D Customization Forum</title>
    <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/list-all-available-plot-styles-with-net-api/m-p/11617709#M4512</link>
    <description>&lt;P&gt;Thanks Jeff, This code snippet helps me to retrieve .stb and .ctb files and using PiaNo.dll I am able to find Plot styles associated with those file.&lt;/P&gt;</description>
    <pubDate>Tue, 13 Dec 2022 17:33:39 GMT</pubDate>
    <dc:creator>varshaauti27</dc:creator>
    <dc:date>2022-12-13T17:33:39Z</dc:date>
    <item>
      <title>List all available plot styles with .NET API</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/list-all-available-plot-styles-with-net-api/m-p/11608102#M4505</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking for method or way to retrieve all available plot styles. There is&amp;nbsp;&lt;SPAN&gt;PlotStyleNameDictionaryId gives&amp;nbsp;plot styles that are currently being used. But looking for a method to list ALL of the available plot styles, including those that haven't yet been used in the drawing?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2022 00:40:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/list-all-available-plot-styles-with-net-api/m-p/11608102#M4505</guid>
      <dc:creator>varshaauti27</dc:creator>
      <dc:date>2022-12-09T00:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: List all available plot styles with .NET API</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/list-all-available-plot-styles-with-net-api/m-p/11609798#M4506</link>
      <description>&lt;P&gt;You need to be able to read the actual style table file (.stb). I use PiaNO for this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It can be found here:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/phusband/PiaNO" target="_blank"&gt;https://github.com/phusband/PiaNO&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2022 17:22:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/list-all-available-plot-styles-with-net-api/m-p/11609798#M4506</guid>
      <dc:creator>hippe013</dc:creator>
      <dc:date>2022-12-09T17:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: List all available plot styles with .NET API</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/list-all-available-plot-styles-with-net-api/m-p/11615032#M4507</link>
      <description>&lt;P&gt;Is it possible to read style table file (.stb) with API itself instead of third-party dll?&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2022 18:08:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/list-all-available-plot-styles-with-net-api/m-p/11615032#M4507</guid>
      <dc:creator>varshaauti27</dc:creator>
      <dc:date>2022-12-12T18:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: List all available plot styles with .NET API</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/list-all-available-plot-styles-with-net-api/m-p/11615159#M4508</link>
      <description>&lt;LI-CODE lang="general"&gt;        [CommandMethod("ListAllPlotStyles")]
        public void listallplotstyles()
        {
            dynamic comAcad = Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication;
            string[] stylePaths = comAcad.Preferences.Files.PrinterStyleSheetPath.Split(';');
            var theList = "";
            //if there are multiple paths, will need to loop through those as well
            foreach (var fileName in Directory.GetFiles(stylePaths[0]))
            {
                if (fileName.EndsWith("tb"))
                    theList += theList == "" ? fileName : "\n" + fileName;
            }
            if (theList == "")
                return;
            Application.ShowAlertDialog(theList.ToString());
        }
&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 12 Dec 2022 19:02:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/list-all-available-plot-styles-with-net-api/m-p/11615159#M4508</guid>
      <dc:creator>Jeff_M</dc:creator>
      <dc:date>2022-12-12T19:02:02Z</dc:date>
    </item>
    <item>
      <title>Re: List all available plot styles with .NET API</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/list-all-available-plot-styles-with-net-api/m-p/11615341#M4509</link>
      <description>&lt;P&gt;Thanks Jeff for looking into this issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I don't need .stb file list.&amp;nbsp; I am looking for all available plot style list.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="varshaauti27_0-1670876471901.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1151620i276E0C3B22C5688B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="varshaauti27_0-1670876471901.png" alt="varshaauti27_0-1670876471901.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Refer attached image, Where I have selected "acad.stb" and "Autodesk-Color.stb" as plot style table which gives me plot styles associated with that selected style table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking for way to retrieve all available plot styles. I think there might be way to read plot style table and grab plot styles. Not sure at this moment if it's possible with API&lt;/P&gt;&lt;P&gt;Any workaround to retrieve all plot styles available is appreciated. Thanks a lot!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2022 20:28:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/list-all-available-plot-styles-with-net-api/m-p/11615341#M4509</guid>
      <dc:creator>varshaauti27</dc:creator>
      <dc:date>2022-12-12T20:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: List all available plot styles with .NET API</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/list-all-available-plot-styles-with-net-api/m-p/11615486#M4510</link>
      <description>&lt;P&gt;Ah, completely misread the request. Why not use the application&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1633394"&gt;@hippe013&lt;/a&gt;&amp;nbsp;suggested? It has a free use license and the source code is included so you would be able to combine that dll with yours. I'm not seeing anything built-in to the Autodesk API's.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2022 21:37:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/list-all-available-plot-styles-with-net-api/m-p/11615486#M4510</guid>
      <dc:creator>Jeff_M</dc:creator>
      <dc:date>2022-12-12T21:37:46Z</dc:date>
    </item>
    <item>
      <title>Re: List all available plot styles with .NET API</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/list-all-available-plot-styles-with-net-api/m-p/11617414#M4511</link>
      <description>&lt;P&gt;There isn't anything the AutoCAD API for reading .ctb or .stb files. PiaNO is very easy to use. And as&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/32637"&gt;@Jeff_M&lt;/a&gt;&amp;nbsp;said, the source code is available if you wanted to include it in your own dll. I just compiled the dll as it was presented and include it as a reference in my projects that require reading an .stb file. Here is a quick example:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Public Shared Function GetPlotStyleNames(path As String, pStyleMode As Integer) As StringCollection
   Dim styleNames As New StringCollection
   If pStyleMode = 0 Then
      'Named Plot Styles
      Dim plotStyleTable As New PlotStyleTable(path)
      For Each style As PlotStyle In plotStyleTable.PlotStyles
         styleNames.Add(style.Name)
      Next
   ElseIf pStyleMode = 1 Then
      'Color Dependent Styles
      Dim colorTable As New ColorDependentPlotStyleTable(path)
      For Each style As PlotStyle In colorTable.PlotStyles
         styleNames.Add(style.Name)
      Next
   End If
   Return styleNames
End Function&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 15:33:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/list-all-available-plot-styles-with-net-api/m-p/11617414#M4511</guid>
      <dc:creator>hippe013</dc:creator>
      <dc:date>2022-12-13T15:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: List all available plot styles with .NET API</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/list-all-available-plot-styles-with-net-api/m-p/11617709#M4512</link>
      <description>&lt;P&gt;Thanks Jeff, This code snippet helps me to retrieve .stb and .ctb files and using PiaNo.dll I am able to find Plot styles associated with those file.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 17:33:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/list-all-available-plot-styles-with-net-api/m-p/11617709#M4512</guid>
      <dc:creator>varshaauti27</dc:creator>
      <dc:date>2022-12-13T17:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: List all available plot styles with .NET API</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/list-all-available-plot-styles-with-net-api/m-p/11617714#M4513</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1633394"&gt;@hippe013&lt;/a&gt;&amp;nbsp;Thank you so much for looking into this issue and providing source code. I am able to retrieve Plot styles using PiaNo.dll&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 17:36:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/list-all-available-plot-styles-with-net-api/m-p/11617714#M4513</guid>
      <dc:creator>varshaauti27</dc:creator>
      <dc:date>2022-12-13T17:36:46Z</dc:date>
    </item>
  </channel>
</rss>

