<?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: add text to points, without block creation. in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/add-text-to-points-without-block-creation/m-p/3659202#M52950</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT color="#666699"&gt;&amp;gt;&amp;gt; but the text does not get created&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Take a look to my response above, to all questions/all suggestions, e.g. using the &lt;FONT color="#666699" face="lucida sans unicode,lucida sans"&gt;_FIND&lt;/FONT&gt; command to search for the text.&lt;/P&gt;&lt;P&gt;I think as you have set the text-height to 0.5 and you are using shape-data that zoom extents is so big that a text with height of 0.5 is just not visible, but it's there, ...especially because you don't get an error message, or do you?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- alfred -&lt;/P&gt;</description>
    <pubDate>Mon, 15 Oct 2012 07:29:20 GMT</pubDate>
    <dc:creator>Alfred.NESWADBA</dc:creator>
    <dc:date>2012-10-15T07:29:20Z</dc:date>
    <item>
      <title>add text to points, without block creation.</title>
      <link>https://forums.autodesk.com/t5/net-forum/add-text-to-points-without-block-creation/m-p/3659080#M52945</link>
      <description>&lt;PRE&gt;{
                    Entity e = (Entity)tr.GetObject(id, OpenMode.ForRead);
    
                    DBPoint p = (DBPoint)e;
                    ed.WriteMessage(" p.Position.X --&amp;gt; " + p.Position.X + " / Y= " + p.Position.Y + " / Z= " + p.Position.Z);
                    DBText acText = new DBText();
                    acText.SetDatabaseDefaults();
                    acText.Position = new Point3d(Convert.ToDouble(p.Position.X), Convert.ToDouble(p.Position.Y), 0);
                    acText.Height = 0.5;
                    acText.TextString = "Hello, World.";
                    ents.Add(acText);

                    acBlkTblRec.AppendEntity(acText);
                    tr.AddNewlyCreatedDBObject(acText, true);
                }
                tr.Commit();&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;In the above I can add text to the drawing with the blocks defined as below:&lt;/P&gt;&lt;PRE&gt;BlockTable acBlkTbl;
                acBlkTbl = tr.GetObject(db.BlockTableId, OpenMode.ForRead) as BlockTable;
                BlockTableRecord acBlkTblRec;
                acBlkTblRec = tr.GetObject(acBlkTbl[BlockTableRecord.ModelSpace], OpenMode.ForWrite) as BlockTableRecord;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Can I add text to a dwg file which has shp data imported, without using a block. The above code to add text to a new file with points works well.&lt;/P&gt;&lt;P&gt;But if my file has some points imported from a SHP file, the text does not get created.&lt;/P&gt;&lt;P&gt;Please suggest a way to add a text to this dwg file with imported shp data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2012 04:22:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/add-text-to-points-without-block-creation/m-p/3659080#M52945</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-10-15T04:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: add text to points, without block creation.</title>
      <link>https://forums.autodesk.com/t5/net-forum/add-text-to-points-without-block-creation/m-p/3659126#M52946</link>
      <description>&lt;P&gt;Try to transform your point:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;acText.Position = new Point3d(Convert.ToDouble(p.Position.X), Convert.ToDouble(p.Position.Y)), 0.TransformBy(Matrix3d.Inverse);&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2012 05:57:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/add-text-to-points-without-block-creation/m-p/3659126#M52946</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2012-10-15T05:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: add text to points, without block creation.</title>
      <link>https://forums.autodesk.com/t5/net-forum/add-text-to-points-without-block-creation/m-p/3659142#M52947</link>
      <description>&lt;P&gt;the above does not work. It is possible that I can replace this line. add the entity to a block.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; acBlkTblRec.AppendEntity(acText);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2012 06:36:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/add-text-to-points-without-block-creation/m-p/3659142#M52947</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-10-15T06:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: add text to points, without block creation.</title>
      <link>https://forums.autodesk.com/t5/net-forum/add-text-to-points-without-block-creation/m-p/3659146#M52948</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT color="#666699"&gt;&amp;gt;&amp;gt; But if my file has some points imported from a SHP file, the text does not get created.&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;That makes me thinking that there is any other problem but not AutoCAD (plain AutoCAD).&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;First: to import SHP-data needs Map3D or Civil3D or a 3rd-party app. So what product did you use (including version and servicepack as info)?&lt;/LI&gt;&lt;LI&gt;Next: you may have really imported using command &lt;FONT color="#666699" face="lucida sans unicode,lucida sans"&gt;_MAPIMPORT&lt;/FONT&gt; or you have it referenced via &lt;FONT color="#666699" face="lucida sans unicode,lucida sans"&gt;_DATACONNECT&lt;/FONT&gt; or it was a function of an external app, what did you use?&lt;/LI&gt;&lt;LI&gt;Last but not least: "the text does not get created" ... just ot make sure: you don't see the text (then zoom to the coordinates or run &lt;FONT color="#666699" face="lucida sans unicode,lucida sans"&gt;_FIND&lt;/FONT&gt; for "Hello World", make sure none of the layers are off or frozen) or you get an error message ==&amp;gt; which one?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- alfred -&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2012 06:55:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/add-text-to-points-without-block-creation/m-p/3659146#M52948</guid>
      <dc:creator>Alfred.NESWADBA</dc:creator>
      <dc:date>2012-10-15T06:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: add text to points, without block creation.</title>
      <link>https://forums.autodesk.com/t5/net-forum/add-text-to-points-without-block-creation/m-p/3659170#M52949</link>
      <description>&lt;P&gt;1. Version: autocad3D 2012&lt;/P&gt;&lt;P&gt;2. with MAPIMPORT, imported the point data and zoom , extent to get it in the current display. Also attached the object data also, which is with the SHP file.&lt;/P&gt;&lt;P&gt;3. I want to add a point near to these points with a text that displays Hello world.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With the objectid's of these point, I get the x,y and z values which I use to define the position of the text .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;acText.Position = new Point3d(Convert.ToDouble(p.Position.X), Convert.ToDouble(p.Position.Y), 0);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;but the text does not get created if the dwg contains the imported points.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;else on any other dwg I can create text and also add text to the points created with POINT command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2012 07:14:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/add-text-to-points-without-block-creation/m-p/3659170#M52949</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-10-15T07:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: add text to points, without block creation.</title>
      <link>https://forums.autodesk.com/t5/net-forum/add-text-to-points-without-block-creation/m-p/3659202#M52950</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT color="#666699"&gt;&amp;gt;&amp;gt; but the text does not get created&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Take a look to my response above, to all questions/all suggestions, e.g. using the &lt;FONT color="#666699" face="lucida sans unicode,lucida sans"&gt;_FIND&lt;/FONT&gt; command to search for the text.&lt;/P&gt;&lt;P&gt;I think as you have set the text-height to 0.5 and you are using shape-data that zoom extents is so big that a text with height of 0.5 is just not visible, but it's there, ...especially because you don't get an error message, or do you?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- alfred -&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2012 07:29:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/add-text-to-points-without-block-creation/m-p/3659202#M52950</guid>
      <dc:creator>Alfred.NESWADBA</dc:creator>
      <dc:date>2012-10-15T07:29:20Z</dc:date>
    </item>
    <item>
      <title>Re: add text to points, without block creation.</title>
      <link>https://forums.autodesk.com/t5/net-forum/add-text-to-points-without-block-creation/m-p/3659216#M52951</link>
      <description>&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The size was the issue.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2012 07:47:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/add-text-to-points-without-block-creation/m-p/3659216#M52951</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-10-15T07:47:14Z</dc:date>
    </item>
  </channel>
</rss>

