<?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 PointEntity3D in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/pointentity3d/m-p/1792207#M80103</link>
    <description>Hi all,&lt;BR /&gt;
&lt;BR /&gt;
In a previous post I was advised by Jason Booth (thanks Jason) to use the PointEntity2d or PointEntity3d classes in order to create a point which can be added to the database / model space.&lt;BR /&gt;
&lt;BR /&gt;
I am unable to find any information on how to create an object with those classes.  They have an " unusual "  constructor,&lt;BR /&gt;
&lt;BR /&gt;
Create(System.IntPtr unmanagedPointer, System.Boolean autoDelete)  &lt;BR /&gt;
&lt;BR /&gt;
Parameters&lt;BR /&gt;
unmanagedPointer Input System.IntPtr object.  &lt;BR /&gt;
autoDelete Input System.Boolean object.  &lt;BR /&gt;
&lt;BR /&gt;
I understand that I need to create an unmanagedPointer to a point3D object, and then use it to crete the PointEntity3D. Am I correct ? How can it be done ?&lt;BR /&gt;
&lt;BR /&gt;
I cannot find any reference to PointEntity3D on any Autodesk forum, and nothing useful on the rest of the internet , so any help will be very appreciated.&lt;BR /&gt;
&lt;BR /&gt;
j.</description>
    <pubDate>Mon, 16 Oct 2006 10:17:08 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2006-10-16T10:17:08Z</dc:date>
    <item>
      <title>PointEntity3D</title>
      <link>https://forums.autodesk.com/t5/net-forum/pointentity3d/m-p/1792207#M80103</link>
      <description>Hi all,&lt;BR /&gt;
&lt;BR /&gt;
In a previous post I was advised by Jason Booth (thanks Jason) to use the PointEntity2d or PointEntity3d classes in order to create a point which can be added to the database / model space.&lt;BR /&gt;
&lt;BR /&gt;
I am unable to find any information on how to create an object with those classes.  They have an " unusual "  constructor,&lt;BR /&gt;
&lt;BR /&gt;
Create(System.IntPtr unmanagedPointer, System.Boolean autoDelete)  &lt;BR /&gt;
&lt;BR /&gt;
Parameters&lt;BR /&gt;
unmanagedPointer Input System.IntPtr object.  &lt;BR /&gt;
autoDelete Input System.Boolean object.  &lt;BR /&gt;
&lt;BR /&gt;
I understand that I need to create an unmanagedPointer to a point3D object, and then use it to crete the PointEntity3D. Am I correct ? How can it be done ?&lt;BR /&gt;
&lt;BR /&gt;
I cannot find any reference to PointEntity3D on any Autodesk forum, and nothing useful on the rest of the internet , so any help will be very appreciated.&lt;BR /&gt;
&lt;BR /&gt;
j.</description>
      <pubDate>Mon, 16 Oct 2006 10:17:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/pointentity3d/m-p/1792207#M80103</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-10-16T10:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: PointEntity3D</title>
      <link>https://forums.autodesk.com/t5/net-forum/pointentity3d/m-p/1792208#M80104</link>
      <description>It is not PointEntity2d or PointEntity3d but it is DBPoint:&lt;BR /&gt;
Autodesk.AutoCAD.DatabaseServices.DBPoint&lt;BR /&gt;
For example:&lt;BR /&gt;
[code]&lt;BR /&gt;
    [CommandMethod("AddPoint")]&lt;BR /&gt;
    static public void AddPoint()&lt;BR /&gt;
    {&lt;BR /&gt;
      Document doc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;&lt;BR /&gt;
      Database db  = doc.Database;&lt;BR /&gt;
      Editor   ed  = doc.Editor;&lt;BR /&gt;
      PromptPointResult rs = ed.GetPoint("\nSelect point: ");&lt;BR /&gt;
      if (rs.Status == PromptStatus.OK)&lt;BR /&gt;
      {&lt;BR /&gt;
        DBPoint dbpt = new DBPoint(rs.Value); // If UCS != WCS you need translate point UCS-&amp;gt;WCS&lt;BR /&gt;
        using (Transaction tr = db.TransactionManager.StartTransaction())&lt;BR /&gt;
        {&lt;BR /&gt;
          BlockTableRecord btr = tr.GetObject(doc.Database.CurrentSpaceId,OpenMode.ForWrite) as BlockTableRecord;&lt;BR /&gt;
          if (btr != null) {&lt;BR /&gt;
            dbpt.SetDatabaseDefaults(db);&lt;BR /&gt;
            btr.AppendEntity(dbpt);&lt;BR /&gt;
            tr.AddNewlyCreatedDBObject(dbpt,true);&lt;BR /&gt;
          }&lt;BR /&gt;
          tr.Commit();&lt;BR /&gt;
        }&lt;BR /&gt;
      }&lt;BR /&gt;
    }&lt;BR /&gt;
[/code]

Message was edited by: Alexander Rivilis</description>
      <pubDate>Mon, 16 Oct 2006 10:27:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/pointentity3d/m-p/1792208#M80104</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-10-16T10:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: PointEntity3D</title>
      <link>https://forums.autodesk.com/t5/net-forum/pointentity3d/m-p/1792209#M80105</link>
      <description>Thanks a lot Alex, that solved it. &lt;BR /&gt;
&lt;BR /&gt;
j.</description>
      <pubDate>Mon, 16 Oct 2006 10:45:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/pointentity3d/m-p/1792209#M80105</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-10-16T10:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: PointEntity3D</title>
      <link>https://forums.autodesk.com/t5/net-forum/pointentity3d/m-p/1792210#M80106</link>
      <description>I should have noticed this since PointEntity2d and PointEntity3d are in the Autocad.Geometry namespace. Everything in that namespace from what I've seen can't be added directly to the drawing database (hence the reason for the Autocad.DatabaseServices namespace).&lt;BR /&gt;
&lt;BR /&gt;
Sorry to confuse you, DbPoint is correct (as you already know).</description>
      <pubDate>Mon, 16 Oct 2006 14:57:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/pointentity3d/m-p/1792210#M80106</guid>
      <dc:creator>jbooth</dc:creator>
      <dc:date>2006-10-16T14:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: PointEntity3D</title>
      <link>https://forums.autodesk.com/t5/net-forum/pointentity3d/m-p/1792211#M80107</link>
      <description>Hi Jason,&lt;BR /&gt;
&lt;BR /&gt;
No worries, I actually learned quite a few things trying to get things to work with the PointEntity2d / PointEntity3d classes, plus its the intention that counts !&lt;BR /&gt;
&lt;BR /&gt;
j.</description>
      <pubDate>Wed, 18 Oct 2006 14:02:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/pointentity3d/m-p/1792211#M80107</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-10-18T14:02:42Z</dc:date>
    </item>
  </channel>
</rss>

