<?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: drawing properties-&amp;gt; custom tab【.net programming】 in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/drawing-properties-gt-custom-tab-net-programming/m-p/6023223#M37251</link>
    <description>cant change “Autodesk.AutoCAD.Interop.Common.AcadDatabase”to “Autodesk.AutoCAD.DatabaseServices.Database”&lt;BR /&gt;here's the problem</description>
    <pubDate>Thu, 04 Feb 2016 02:28:06 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-02-04T02:28:06Z</dc:date>
    <item>
      <title>drawing properties-&gt; custom tab【.net programming】</title>
      <link>https://forums.autodesk.com/t5/net-forum/drawing-properties-gt-custom-tab-net-programming/m-p/6021208#M37244</link>
      <description>&lt;P&gt;Hi, everyone&lt;/P&gt;&lt;P&gt;Now i am using c# for my autocad2014 development.&amp;nbsp;&lt;/P&gt;&lt;P&gt;may I ask how can I get the data from this custom tab?&lt;/P&gt;&lt;P&gt;I hava try this , but not work, pls help.&lt;img id="smileyfrustrated" class="emoticon emoticon-smileyfrustrated" src="https://forums.autodesk.com/i/smilies/16x16_smiley-frustrated.png" alt="Smiley Frustrated" title="Smiley Frustrated" /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;String test = thisDrawing.SummaryInfo.Keywords;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://forums.autodesk.com/t5/image/serverpage/image-id/215683i3226C3A31825DFC9/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="GUID-240E96EB-60DE-4DBB-B337-64686649006A (1).png" title="GUID-240E96EB-60DE-4DBB-B337-64686649006A (1).png" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2016 07:19:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/drawing-properties-gt-custom-tab-net-programming/m-p/6021208#M37244</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-02-03T07:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: drawing properties-&gt; custom tab【.net programming】</title>
      <link>https://forums.autodesk.com/t5/net-forum/drawing-properties-gt-custom-tab-net-programming/m-p/6021232#M37245</link>
      <description>&lt;P&gt;pls help, really in urgent&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2016 07:45:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/drawing-properties-gt-custom-tab-net-programming/m-p/6021232#M37245</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-02-03T07:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: drawing properties-&gt; custom tab【.net programming】</title>
      <link>https://forums.autodesk.com/t5/net-forum/drawing-properties-gt-custom-tab-net-programming/m-p/6021233#M37246</link>
      <description>&lt;P&gt;or can just provide me an interface to access this custom tab is ok, thx thx.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2016 07:46:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/drawing-properties-gt-custom-tab-net-programming/m-p/6021233#M37246</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-02-03T07:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: drawing properties-&gt; custom tab【.net programming】</title>
      <link>https://forums.autodesk.com/t5/net-forum/drawing-properties-gt-custom-tab-net-programming/m-p/6022031#M37247</link>
      <description>&lt;P&gt;I'm not a C# &amp;amp; NET user (yet)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but I read about a similar subject in&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/net/saving-an-external-side-database/m-p/6019248#M47412" target="_self"&gt;this Forum VBA thread&lt;/A&gt;&lt;/P&gt;&lt;P&gt;maybe&amp;nbsp;you can get some elements from and "translate" into C# and NET&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2016 15:09:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/drawing-properties-gt-custom-tab-net-programming/m-p/6022031#M37247</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-02-03T15:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: drawing properties-&gt; custom tab【.net programming】</title>
      <link>https://forums.autodesk.com/t5/net-forum/drawing-properties-gt-custom-tab-net-programming/m-p/6022426#M37248</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can explore it yourself when you know that it is a property under &lt;STRONG&gt;Database.SummerayInfo&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2016 17:52:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/drawing-properties-gt-custom-tab-net-programming/m-p/6022426#M37248</guid>
      <dc:creator>_Tharwat</dc:creator>
      <dc:date>2016-02-03T17:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: drawing properties-&gt; custom tab【.net programming】</title>
      <link>https://forums.autodesk.com/t5/net-forum/drawing-properties-gt-custom-tab-net-programming/m-p/6022687#M37249</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use these extension methods.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;using System.Collections;
using System.Collections.Generic;

namespace Autodesk.AutoCAD.DatabaseServices
{
    /// &amp;lt;summary&amp;gt;
    /// Provides extension methods for the Database type
    /// &amp;lt;/summary&amp;gt;
    public static class DatabaseExtension
    {
        /// &amp;lt;summary&amp;gt;
        /// Gets the drawing custom properties.
        /// &amp;lt;/summary&amp;gt;
        /// &amp;lt;param name="db"&amp;gt;Database instance this method applies to.&amp;lt;/param&amp;gt;
        /// &amp;lt;returns&amp;gt;A strongly typed dictionary containing the entries.&amp;lt;/returns&amp;gt;
        public static Dictionary&amp;lt;string, string&amp;gt; GetCustomProperties(this Database db)
        {
            Dictionary&amp;lt;string, string&amp;gt; result = new Dictionary&amp;lt;string, string&amp;gt;();
            IDictionaryEnumerator dictEnum = db.SummaryInfo.CustomProperties;
            while (dictEnum.MoveNext())
            {
                DictionaryEntry entry = dictEnum.Entry;
                result.Add((string)entry.Key, (string)entry.Value);
            }
            return result;
        }

        /// &amp;lt;summary&amp;gt;
        /// Gets a drawing custom property.
        /// &amp;lt;/summary&amp;gt;
        /// &amp;lt;param name="db"&amp;gt;Database instance this method applies to.&amp;lt;/param&amp;gt;
        /// &amp;lt;param name="key"&amp;gt;Property key.&amp;lt;/param&amp;gt;
        /// &amp;lt;returns&amp;gt;The property value or null if not found&amp;lt;/returns&amp;gt;
        public static string GetCustomProperty(this Database db, string key)
        {
            DatabaseSummaryInfoBuilder sumInfo = new DatabaseSummaryInfoBuilder(db.SummaryInfo);
            IDictionary custProps = sumInfo.CustomPropertyTable;
            return (string)custProps[key];
        }

        /// &amp;lt;summary&amp;gt;
        /// Sets a property value
        /// &amp;lt;/summary&amp;gt;
        /// &amp;lt;param name="db"&amp;gt;Database instance this method applies to.&amp;lt;/param&amp;gt;
        /// &amp;lt;param name="key"&amp;gt;Property key.&amp;lt;/param&amp;gt;
        /// &amp;lt;param name="value"&amp;gt;Property value.&amp;lt;/param&amp;gt;
        public static void SetCustomProperty(this Database db, string key, string value)
        {
            DatabaseSummaryInfoBuilder infoBuilder = new DatabaseSummaryInfoBuilder(db.SummaryInfo);
            IDictionary custProps = infoBuilder.CustomPropertyTable;
            if (custProps.Contains(key))
                custProps[key] = value;
            else
                custProps.Add(key, value);
            db.SummaryInfo = infoBuilder.ToDatabaseSummaryInfo();
        }
    }
}&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2016 20:13:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/drawing-properties-gt-custom-tab-net-programming/m-p/6022687#M37249</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2016-02-03T20:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: drawing properties-&gt; custom tab【.net programming】</title>
      <link>https://forums.autodesk.com/t5/net-forum/drawing-properties-gt-custom-tab-net-programming/m-p/6023192#M37250</link>
      <description>&lt;P&gt;Thx for your answer and quick response.&lt;/P&gt;&lt;P&gt;here's the problem,&lt;/P&gt;&lt;P&gt;while I am using this class to get the drawing,&lt;/P&gt;&lt;P&gt;Autodesk.AutoCAD.Interop.Common;&lt;/P&gt;&lt;P&gt;however, your entension method is using&amp;nbsp;Autodesk.AutoCAD.DatabaseServices, seems cant link together.&lt;/P&gt;&lt;P&gt;May I ask how can i fill in the&amp;nbsp;&lt;SPAN&gt;this Database db by using &amp;nbsp;Autodesk.AutoCAD.Interop.Common??&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;public static Dictionary&amp;lt;string, string&amp;gt; GetCustomProperties(this Database db)&lt;BR /&gt;{&lt;BR /&gt;Dictionary&amp;lt;string, string&amp;gt; result = new Dictionary&amp;lt;string, string&amp;gt;();&lt;BR /&gt;IDictionaryEnumerator dictEnum = db.SummaryInfo.CustomProperties;&lt;BR /&gt;while (dictEnum.MoveNext())&lt;BR /&gt;{&lt;BR /&gt;DictionaryEntry entry = dictEnum.Entry;&lt;BR /&gt;result.Add((string)entry.Key, (string)entry.Value);&lt;BR /&gt;}&lt;BR /&gt;return result;&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2016 01:57:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/drawing-properties-gt-custom-tab-net-programming/m-p/6023192#M37250</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-02-04T01:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: drawing properties-&gt; custom tab【.net programming】</title>
      <link>https://forums.autodesk.com/t5/net-forum/drawing-properties-gt-custom-tab-net-programming/m-p/6023223#M37251</link>
      <description>cant change “Autodesk.AutoCAD.Interop.Common.AcadDatabase”to “Autodesk.AutoCAD.DatabaseServices.Database”&lt;BR /&gt;here's the problem</description>
      <pubDate>Thu, 04 Feb 2016 02:28:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/drawing-properties-gt-custom-tab-net-programming/m-p/6023223#M37251</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-02-04T02:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: drawing properties-&gt; custom tab【.net programming】</title>
      <link>https://forums.autodesk.com/t5/net-forum/drawing-properties-gt-custom-tab-net-programming/m-p/6023456#M37252</link>
      <description>&lt;P&gt;I'm answering mainly&amp;nbsp;to learn myself from your feedbacks then to actually help the OP. though I hope I will, too&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Should extension methods be possible with reference to COM namespaces ones, then I'd just use the proper COM&amp;nbsp;class name instead of "Database".&lt;/P&gt;&lt;P&gt;Since in ActiveX the "SummaryInfo" object is accessed via&amp;nbsp;the "SummaryInfo" property of "Database" or "Document" objects,&amp;nbsp;whose class names are "AcadDatabase" and "AcadDocument",&amp;nbsp; and since&amp;nbsp;the OP's using "Autodesk.AutoCAD.Interop.Common", then I would try "AcadDatabase"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the other hand I think he could go on with the "totally COM" approach&amp;nbsp;and use quite much the same code of the link in post #4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd highly appreciate you all to elaborate on what above&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, 04 Feb 2016 07:30:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/drawing-properties-gt-custom-tab-net-programming/m-p/6023456#M37252</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-02-04T07:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: drawing properties-&gt; custom tab【.net programming】</title>
      <link>https://forums.autodesk.com/t5/net-forum/drawing-properties-gt-custom-tab-net-programming/m-p/6023474#M37253</link>
      <description>&lt;P&gt;Sorry.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As you wrote: "Now i am using c# for my autocad2014 development.", I thaught you wanted a .NET reply and didn't saw you use the COM/ActiveX API.&lt;/P&gt;
&lt;P&gt;By my side, I try to avoid, as far as I can, tu use the COM API which is really less powerfull (should I say 'crappy' ?) compared the the .NET one.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyway, the SummaryInfo.Keywords property corresponds to an entry in the "Summary" tab.&lt;/P&gt;
&lt;P&gt;If you want to access to the "Custom" tab entries, you have to use the following methods:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;thisDrawing.SummaryInfo.AddCustomInfo()&lt;/LI&gt;
&lt;LI&gt;thisDrawing.SummaryInfo.GetCustomByIndex()&lt;/LI&gt;
&lt;LI&gt;thisDrawing.SummaryInfo.GetCustomByKey()&lt;/LI&gt;
&lt;LI&gt;thisDrawing.SummaryInfo.NumCustomInfo()&lt;/LI&gt;
&lt;LI&gt;thisDrawing.SummaryInfo.RemoveCustomByIndex()&lt;/LI&gt;
&lt;LI&gt;thisDrawing.SummaryInfo.RemoveCustomByKey()&lt;/LI&gt;
&lt;LI&gt;thisDrawing.SummaryInfo.SetCustomByIndex()&lt;/LI&gt;
&lt;LI&gt;thisDrawing.SummaryInfo.SetCustomByKey()&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Thu, 04 Feb 2016 07:55:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/drawing-properties-gt-custom-tab-net-programming/m-p/6023474#M37253</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2016-02-04T07:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: drawing properties-&gt; custom tab【.net programming】</title>
      <link>https://forums.autodesk.com/t5/net-forum/drawing-properties-gt-custom-tab-net-programming/m-p/6023539#M37254</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;RICVBA a écrit&amp;nbsp;:&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;Should extension methods be possible with reference to COM namespaces ones
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You can do something like this (but, one more time, use .NET API instead of COM API as soon as it's possible)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;using System.Collections.Generic;

namespace Autodesk.AutoCAD.Interop.Common
{
    public static class InteropExtension
    {
        public static Dictionary&amp;lt;string, string&amp;gt; GetCustomProperties(this AcadDocument thisDrawing)
        {
            Dictionary&amp;lt;string, string&amp;gt; result = new Dictionary&amp;lt;string, string&amp;gt;();
            AcadSummaryInfo info = thisDrawing.SummaryInfo;
            for (int i = 0; i &amp;lt; info.NumCustomInfo(); i++)
            {
                string key, val;
                info.GetCustomByIndex(i, out key, out val);
                result.Add(key, val);
            }
            return result;
        }
    }
}&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Feb 2016 08:49:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/drawing-properties-gt-custom-tab-net-programming/m-p/6023539#M37254</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2016-02-04T08:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: drawing properties-&gt; custom tab【.net programming】</title>
      <link>https://forums.autodesk.com/t5/net-forum/drawing-properties-gt-custom-tab-net-programming/m-p/6023798#M37255</link>
      <description>&lt;P&gt;thank you Gile&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;glad to see my guessing was&amp;nbsp;nearly correct.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and I assure you:&amp;nbsp;when in .NET I'll only use its API!&lt;/P&gt;&lt;P&gt;although, in regard to that,&amp;nbsp;I read sometimes that there still lingers the need&amp;nbsp;of&amp;nbsp;COM ones for some specific purposes...&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2016 12:32:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/drawing-properties-gt-custom-tab-net-programming/m-p/6023798#M37255</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-02-04T12:32:17Z</dc:date>
    </item>
  </channel>
</rss>

