<?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: Create instance of my object in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/create-instance-of-my-object/m-p/3440897#M55814</link>
    <description>&lt;P&gt;Yes, this is a .Net class.&lt;/P&gt;</description>
    <pubDate>Wed, 02 May 2012 15:22:00 GMT</pubDate>
    <dc:creator>tcorey</dc:creator>
    <dc:date>2012-05-02T15:22:00Z</dc:date>
    <item>
      <title>Create instance of my object</title>
      <link>https://forums.autodesk.com/t5/net-forum/create-instance-of-my-object/m-p/3439965#M55812</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a class that inherits Polyline. I have added properties to that class.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I try to SetDatabaseDefaults with my object, I get an error "Set database defaults is not a member..."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But if I create a new Polyline, SetDatabaseDefaults works for that object.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Shouldn't the SetDatabaseDefaults method become a member of my class&amp;nbsp;when I inherit from Polyline?&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;Tim&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>Tue, 01 May 2012 23:38:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/create-instance-of-my-object/m-p/3439965#M55812</guid>
      <dc:creator>tcorey</dc:creator>
      <dc:date>2012-05-01T23:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: Create instance of my object</title>
      <link>https://forums.autodesk.com/t5/net-forum/create-instance-of-my-object/m-p/3440117#M55813</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;tcorey wrote: &lt;BR /&gt;
&lt;P&gt;I have created a class that inherits Polyline...&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Is it a .NET class?&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2012 04:50:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/create-instance-of-my-object/m-p/3440117#M55813</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2012-05-02T04:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: Create instance of my object</title>
      <link>https://forums.autodesk.com/t5/net-forum/create-instance-of-my-object/m-p/3440897#M55814</link>
      <description>&lt;P&gt;Yes, this is a .Net class.&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2012 15:22:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/create-instance-of-my-object/m-p/3440897#M55814</guid>
      <dc:creator>tcorey</dc:creator>
      <dc:date>2012-05-02T15:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: Create instance of my object</title>
      <link>https://forums.autodesk.com/t5/net-forum/create-instance-of-my-object/m-p/3440925#M55815</link>
      <description>&lt;P&gt;&lt;FONT face="helvetica" size="2" color="#000000"&gt;I figured it out.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="helvetica" color="#000000"&gt;I had originally inherited from Autodesk.AutoCAD.GraphicsInterface.Polyline, but if I inherit from Autodesk.AutoCAD.DatabaseServices.Polyline instead, the object will setdatabasedefaults. &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="helvetica" color="#000000"&gt;I don't know why one polyline would have different properties than another, but I'm not gonna let myself get hung up on that detail right now!&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="helvetica" color="#000000"&gt;So, advice for other newbies, there might be multiple Autodesk-supplied classes in various Autodesk libraries. Those classes might use the same name but not have the same properties and methods. &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="helvetica" color="#000000"&gt;Thanks, Alexander, for responding. I'm sure you'll be seeing more beginner-level posts from me....﻿&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2012 15:30:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/create-instance-of-my-object/m-p/3440925#M55815</guid>
      <dc:creator>tcorey</dc:creator>
      <dc:date>2012-05-02T15:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: Create instance of my object</title>
      <link>https://forums.autodesk.com/t5/net-forum/create-instance-of-my-object/m-p/3441637#M55816</link>
      <description>&lt;P&gt;As I understand you try to create custom entity with help of .NET API. &lt;SPAN class="short_text"&gt;&lt;SPAN class="hps"&gt;Am I right&lt;/SPAN&gt;&lt;SPAN&gt;? It is impossible to create custom entity with help of .NET API. It is possible only with help of ObjectARX (C++). &lt;SPAN&gt;&lt;SPAN class="hps"&gt;Therefore&lt;/SPAN&gt; &lt;SPAN class="hps alt-edited"&gt;no sense&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;to create classes&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;inherited from&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;DBObject / Entity,&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;as&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;an instance of&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;this class&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;will not be able&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;to create and&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;add to the&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;dwg-file.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 May 2012 22:02:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/create-instance-of-my-object/m-p/3441637#M55816</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2012-05-02T22:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: Create instance of my object</title>
      <link>https://forums.autodesk.com/t5/net-forum/create-instance-of-my-object/m-p/3444087#M55817</link>
      <description>&lt;P&gt;Wow. Thanks, Alexander. You just saved me a bunch of hours.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The reason I was going to create my own class was so I could apply properties to a polyline-like object,&amp;nbsp;like you would with&amp;nbsp;Xdata through Visual LISP. Is there a way to apply custom properties to an AutoCAD object using VB.NET, without creating my own class?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or should I just switch to C++?&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>Fri, 04 May 2012 08:24:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/create-instance-of-my-object/m-p/3444087#M55817</guid>
      <dc:creator>tcorey</dc:creator>
      <dc:date>2012-05-04T08:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: Create instance of my object</title>
      <link>https://forums.autodesk.com/t5/net-forum/create-instance-of-my-object/m-p/3444115#M55818</link>
      <description>&lt;DIV align="center"&gt;&lt;HR size="2" /&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;EM&gt;tcorey wrote:&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Is there a way to apply custom properties to an AutoCAD object using VB.NET, without creating my own class?&lt;/EM&gt;&lt;/P&gt;
&lt;DIV align="center"&gt;&lt;HR size="2" /&gt;&lt;/DIV&gt;
&lt;P&gt;What do you mean by Custom Property? What do you mean by Custom Property? The property which appears in the Properties pane (OPM)? &lt;BR /&gt; Try code of Kean Walmsley: &lt;A href="http://through-the-interface.typepad.com/through_the_interface/2009/05/modifying-an-autocad-objects-state-via-a-dynamic-property-defined-in-net.html" target="_blank"&gt;http://through-the-interface.typepad.com/through_the_interface/2009/05/modifying-an-autocad-objects-state-via-a-dynamic-property-defined-in-net.html&lt;/A&gt;&lt;/P&gt;
&lt;DIV align="center"&gt;&lt;HR size="2" /&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;EM&gt;tcorey wrote: &lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Or should I just switch to C++?&lt;/EM&gt;&lt;/P&gt;
&lt;DIV align="center"&gt;&lt;HR size="2" /&gt;&lt;/DIV&gt;
&lt;P&gt;Only if you ready to create own custom entity. This is not the easy way.&amp;nbsp;Good luck!&lt;/P&gt;</description>
      <pubDate>Fri, 04 May 2012 08:49:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/create-instance-of-my-object/m-p/3444115#M55818</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2012-05-04T08:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: Create instance of my object</title>
      <link>https://forums.autodesk.com/t5/net-forum/create-instance-of-my-object/m-p/3445339#M55819</link>
      <description>&lt;P&gt;By Custom Properties, I mean my own properties and values assigned to a polyline object. In particular, I want to create a property that holds the View to which my polyline is associated. Using Visual LISP, I would create Xdata to do this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I read through Kean's post and it appears that there is a way to do this with vb.net, so I might continue down that road for now. Or not. Maybe I'll switch to c++, although it's been even longer since I used it than it has been for VB.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Decisions, decisions....&lt;/P&gt;</description>
      <pubDate>Fri, 04 May 2012 21:22:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/create-instance-of-my-object/m-p/3445339#M55819</guid>
      <dc:creator>tcorey</dc:creator>
      <dc:date>2012-05-04T21:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: Create instance of my object</title>
      <link>https://forums.autodesk.com/t5/net-forum/create-instance-of-my-object/m-p/3445659#M55820</link>
      <description>&lt;P&gt;&amp;gt;&amp;gt;&amp;nbsp;&lt;SPAN&gt;Using Visual LISP, I would create Xdata to do this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Using .NET, you&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="line-height: 13px;"&gt;also&amp;nbsp;&lt;/SPAN&gt;can create Xdata or ExtensionDictionary/Xrecord,this would certainly be simpler than the objectARX/C++ route...&lt;/P&gt;</description>
      <pubDate>Sat, 05 May 2012 12:13:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/create-instance-of-my-object/m-p/3445659#M55820</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2012-05-05T12:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: Create instance of my object</title>
      <link>https://forums.autodesk.com/t5/net-forum/create-instance-of-my-object/m-p/3449111#M55821</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 08 May 2012 17:52:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/create-instance-of-my-object/m-p/3449111#M55821</guid>
      <dc:creator>tcorey</dc:creator>
      <dc:date>2012-05-08T17:52:38Z</dc:date>
    </item>
  </channel>
</rss>

