<?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: Matrix3d Block Entity Position in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/matrix3d-block-entity-position/m-p/2885024#M62259</link>
    <description>&lt;P&gt;Every Block Reference has a BlockTransform Property, so if you have a BlockReference open, you just use that for all the sub objects of the block.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The PromptNestedEntityResult.Transform could be of use if you don't have the BlockRef open, but otherwise it's just an extra step.&lt;/P&gt;</description>
    <pubDate>Tue, 18 Jan 2011 18:54:43 GMT</pubDate>
    <dc:creator>chiefbraincloud</dc:creator>
    <dc:date>2011-01-18T18:54:43Z</dc:date>
    <item>
      <title>Matrix3d Block Entity Position</title>
      <link>https://forums.autodesk.com/t5/net-forum/matrix3d-block-entity-position/m-p/2884434#M62257</link>
      <description>&lt;P&gt;Hi, i have been trying to get the matrix3d transform for any entity, solid3d block but thing seems like not work out for me. I tried with a simple line, using the start point and end point of the line to compute my own matrix3d transform but what about if the line is in a block. The start point and end point of a line in block is always the same, maybe it referencing to the block origin.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;below is a simple prompt to get the entity and if the entity is a block reference then it will add a line with start(-15,0,0) End(15,0,0) so is there any way to get the start point and end point of the line in WCS? and not referencing to the block?&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;PRE&gt;Entity aEntity = (Entity)Trans.GetObject(PromptResult.ObjectId, OpenMode.ForRead);
if (aEntity.GetType() == typeof(BlockReference))
{
BlockReference aBlockReference = (BlockReference)aEntity;
Line aLine = new Line(new Point3d(-15, 0, 0), new Point3d(15, 0, 0));
BlockTableRecord btr = (BlockTableRecord)Trans.GetObject(aBlockReference.BlockTableRecord, OpenMode.ForRead);
btr.UpgradeOpen();
btr.AppendEntity(aLine);
Trans.AddNewlyCreatedDBObject(aLine, true);
Trans.Commit();
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2011 13:44:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/matrix3d-block-entity-position/m-p/2884434#M62257</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-01-18T13:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: Matrix3d Block Entity Position</title>
      <link>https://forums.autodesk.com/t5/net-forum/matrix3d-block-entity-position/m-p/2884514#M62258</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If your entity is within a block, you can use the PromptNestedEntityResult.Transform property.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[CommandMethod("test")]
        public void test()
        {
            Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
            PromptNestedEntityResult pner = ed.GetNestedEntity("\nSelect an entity within a block: ");
            if (pner.Status != PromptStatus.OK)
                return;
            Matrix3d mat = pner.Transform;
            ed.WriteMessage(mat.ToString());
        }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2011 14:19:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/matrix3d-block-entity-position/m-p/2884514#M62258</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2011-01-18T14:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: Matrix3d Block Entity Position</title>
      <link>https://forums.autodesk.com/t5/net-forum/matrix3d-block-entity-position/m-p/2885024#M62259</link>
      <description>&lt;P&gt;Every Block Reference has a BlockTransform Property, so if you have a BlockReference open, you just use that for all the sub objects of the block.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The PromptNestedEntityResult.Transform could be of use if you don't have the BlockRef open, but otherwise it's just an extra step.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2011 18:54:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/matrix3d-block-entity-position/m-p/2885024#M62259</guid>
      <dc:creator>chiefbraincloud</dc:creator>
      <dc:date>2011-01-18T18:54:43Z</dc:date>
    </item>
  </channel>
</rss>

