<?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: Read start- / endpoint coordinates of edges from space using .NET in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/read-start-endpoint-coordinates-of-edges-from-space-using-net/m-p/7043062#M31816</link>
    <description>&lt;P&gt;CadMeUp,&lt;BR /&gt;&lt;BR /&gt;thank you so much for proposing something. I am very new to the Autocad programming though I am very experienced with .NET. I started testing your solution to see where it leads me. Unfortunately I am receiving a NullReferenceException when calling GetObject on the BlockTableID. It shows a valid object and ID in the Debugger for doc.Database.BlockTableId though. No idea why this happens. Do I need to set prerequisites in my AutoCAD file?!&lt;BR /&gt;&lt;BR /&gt;Thanks again and best regards&lt;BR /&gt;&lt;BR /&gt;Gerrit&lt;/P&gt;</description>
    <pubDate>Wed, 26 Apr 2017 09:37:38 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-04-26T09:37:38Z</dc:date>
    <item>
      <title>Read start- / endpoint coordinates of edges from space using .NET</title>
      <link>https://forums.autodesk.com/t5/net-forum/read-start-endpoint-coordinates-of-edges-from-space-using-net/m-p/7039906#M31814</link>
      <description>&lt;P&gt;Dear community,&lt;BR /&gt;&lt;BR /&gt;I am trying do display room "shapes" from a Autocad file in a custom .net application (Floorplan). I managed to read out polylines using .NET (C#), but I have no Idea how to read a Space (Architecture, not Model- or Paperspace). with Properties and a roomtag. I am looking to get the points (start / end) of the single edges that make up the space to sort of "overlay" them on a pdf that is show in our application.&lt;BR /&gt;&lt;BR /&gt;OR... maybe you have a better solution how to do this, even other software recomendations (with a short reason).&lt;BR /&gt;&lt;BR /&gt;THANK YOU IN ADVANCE!!!&lt;BR /&gt;&lt;BR /&gt;Best regards&lt;BR /&gt;Gerrit&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2017 09:04:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/read-start-endpoint-coordinates-of-edges-from-space-using-net/m-p/7039906#M31814</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-04-25T09:04:57Z</dc:date>
    </item>
    <item>
      <title>Re: Read start- / endpoint coordinates of edges from space using .NET</title>
      <link>https://forums.autodesk.com/t5/net-forum/read-start-endpoint-coordinates-of-edges-from-space-using-net/m-p/7041262#M31815</link>
      <description>&lt;P&gt;This might serve as a start point...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Document doc = AcadApp.DocumentManager.CurrentDocument;
BlockTable bt = doc.Database.BlockTableId.GetObject(OpenMode.ForRead) as BlockTable;
BlockTableRecord btr = bt[BlockTableRecord.ModelSpace].GetObject(OpenMode.ForRead) as BlockTableRecord;

foreach (ObjectId id in btr)
{
	if (id.ObjectClass.GetRuntimeType() == typeof(Autodesk.Aec.Arch.DatabaseServices.Space))
	{
		Autodesk.Aec.Arch.DatabaseServices.Space spaceObj = id.GetObject(OpenMode.ForRead) as Space;
		Autodesk.Aec.Geometry.Profile prof = spaceObj.GetProfile(Autodesk.Aec.Arch.DatabaseServices.SpaceProfileType.Base);

		Matrix2d mat = Matrix2d.Displacement(new Point2d(spaceObj.Location.X, spaceObj.Location.Y) - Point2d.Origin);

		foreach (Autodesk.Aec.Geometry.CompoundCurve2dVertex v in prof.Vertices)
		{
			Point2d p = v.Point.TransformBy(mat);
			doc.Editor.WriteMessage("\n{0}", p);
		}
	}
}&lt;/PRE&gt;</description>
      <pubDate>Tue, 25 Apr 2017 17:10:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/read-start-endpoint-coordinates-of-edges-from-space-using-net/m-p/7041262#M31815</guid>
      <dc:creator>cadMeUp</dc:creator>
      <dc:date>2017-04-25T17:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: Read start- / endpoint coordinates of edges from space using .NET</title>
      <link>https://forums.autodesk.com/t5/net-forum/read-start-endpoint-coordinates-of-edges-from-space-using-net/m-p/7043062#M31816</link>
      <description>&lt;P&gt;CadMeUp,&lt;BR /&gt;&lt;BR /&gt;thank you so much for proposing something. I am very new to the Autocad programming though I am very experienced with .NET. I started testing your solution to see where it leads me. Unfortunately I am receiving a NullReferenceException when calling GetObject on the BlockTableID. It shows a valid object and ID in the Debugger for doc.Database.BlockTableId though. No idea why this happens. Do I need to set prerequisites in my AutoCAD file?!&lt;BR /&gt;&lt;BR /&gt;Thanks again and best regards&lt;BR /&gt;&lt;BR /&gt;Gerrit&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2017 09:37:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/read-start-endpoint-coordinates-of-edges-from-space-using-net/m-p/7043062#M31816</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-04-26T09:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: Read start- / endpoint coordinates of edges from space using .NET</title>
      <link>https://forums.autodesk.com/t5/net-forum/read-start-endpoint-coordinates-of-edges-from-space-using-net/m-p/7044227#M31817</link>
      <description>&lt;P&gt;Oh, yeah, the code I posted was partial thinking you would have it within an active transaction, that's probably why the null reference?? The attached is more complete.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2017 16:24:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/read-start-endpoint-coordinates-of-edges-from-space-using-net/m-p/7044227#M31817</guid>
      <dc:creator>cadMeUp</dc:creator>
      <dc:date>2017-04-26T16:24:27Z</dc:date>
    </item>
  </channel>
</rss>

