<?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: Trouble with AttachmentPoint.TopCenter in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/trouble-with-attachmentpoint-topcenter/m-p/2456535#M71241</link>
    <description>That worked, here is the code I used:&lt;BR /&gt;
{code}&lt;BR /&gt;
If Align = AttachmentPoint.BaseLeft Then&lt;BR /&gt;
    TextEnt.Justify = Align&lt;BR /&gt;
ElseIf Align = AttachmentPoint.TopCenter Then&lt;BR /&gt;
    TextEnt.VerticalMode = TextVerticalMode.TextTop&lt;BR /&gt;
    TextEnt.HorizontalMode = TextHorizontalMode.TextCenter&lt;BR /&gt;
    TextEnt.AlignmentPoint = New Point3d(InsPoint)&lt;BR /&gt;
Else&lt;BR /&gt;
    TextEnt.Justify = Align&lt;BR /&gt;
    TextEnt.AlignmentPoint = New Point3d(InsPoint)&lt;BR /&gt;
End If&lt;BR /&gt;
{code}</description>
    <pubDate>Mon, 30 Mar 2009 18:36:09 GMT</pubDate>
    <dc:creator>GTVic</dc:creator>
    <dc:date>2009-03-30T18:36:09Z</dc:date>
    <item>
      <title>Trouble with AttachmentPoint.TopCenter</title>
      <link>https://forums.autodesk.com/t5/net-forum/trouble-with-attachmentpoint-topcenter/m-p/2456532#M71238</link>
      <description>When I create DBText with a TopCenter alignment, the text comes out "Aligned" with a Height of 0 and Angle of 0. Any other value for the attachment point seems to work fine.&lt;BR /&gt;
&lt;BR /&gt;
tsTable = CType(Trans.GetObject(AcadDoc.Database.TextStyleTableId, OpenMode.ForWrite), TextStyleTable)&lt;BR /&gt;
Align = AttachmentPoint.TopCenter&lt;BR /&gt;
TextEnt = New DBText&lt;BR /&gt;
TextEnt.SetDatabaseDefaults()&lt;BR /&gt;
TextEnt.TextString = TextString&lt;BR /&gt;
TextEnt.Position = New Point3d(InsPoint)&lt;BR /&gt;
TextEnt.Justify = Align&lt;BR /&gt;
If Align &amp;lt;&amp;gt; AttachmentPoint.BaseLeft Then TextEnt.AlignmentPoint = New Point3d(InsPoint)&lt;BR /&gt;
TextEnt.Height = Height&lt;BR /&gt;
TextEnt.ColorIndex = Color&lt;BR /&gt;
TextEnt.Rotation = Angle&lt;BR /&gt;
TextEnt.TextStyle = tsTable(Style)&lt;BR /&gt;
TextEnt.Layer = Layer&lt;BR /&gt;
btr = Trans.GetObject(AcadDoc.Database.CurrentSpaceId, OpenMode.ForWrite)&lt;BR /&gt;
btr.AppendEntity(TextEnt)&lt;BR /&gt;
Trans.AddNewlyCreatedDBObject(TextEnt, True)&lt;BR /&gt;
Trans.Commit()</description>
      <pubDate>Fri, 27 Mar 2009 21:06:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/trouble-with-attachmentpoint-topcenter/m-p/2456532#M71238</guid>
      <dc:creator>GTVic</dc:creator>
      <dc:date>2009-03-27T21:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with AttachmentPoint.TopCenter</title>
      <link>https://forums.autodesk.com/t5/net-forum/trouble-with-attachmentpoint-topcenter/m-p/2456533#M71239</link>
      <description>I've seen that, too.  You can set the attribute's VerticalMode and HorizontalMode separately to achieve a TopCenter justification.&lt;BR /&gt;
&lt;BR /&gt;
-drg</description>
      <pubDate>Fri, 27 Mar 2009 23:22:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/trouble-with-attachmentpoint-topcenter/m-p/2456533#M71239</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-03-27T23:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with AttachmentPoint.TopCenter</title>
      <link>https://forums.autodesk.com/t5/net-forum/trouble-with-attachmentpoint-topcenter/m-p/2456534#M71240</link>
      <description>Thanks, I'll give that a try.</description>
      <pubDate>Sat, 28 Mar 2009 09:56:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/trouble-with-attachmentpoint-topcenter/m-p/2456534#M71240</guid>
      <dc:creator>GTVic</dc:creator>
      <dc:date>2009-03-28T09:56:17Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with AttachmentPoint.TopCenter</title>
      <link>https://forums.autodesk.com/t5/net-forum/trouble-with-attachmentpoint-topcenter/m-p/2456535#M71241</link>
      <description>That worked, here is the code I used:&lt;BR /&gt;
{code}&lt;BR /&gt;
If Align = AttachmentPoint.BaseLeft Then&lt;BR /&gt;
    TextEnt.Justify = Align&lt;BR /&gt;
ElseIf Align = AttachmentPoint.TopCenter Then&lt;BR /&gt;
    TextEnt.VerticalMode = TextVerticalMode.TextTop&lt;BR /&gt;
    TextEnt.HorizontalMode = TextHorizontalMode.TextCenter&lt;BR /&gt;
    TextEnt.AlignmentPoint = New Point3d(InsPoint)&lt;BR /&gt;
Else&lt;BR /&gt;
    TextEnt.Justify = Align&lt;BR /&gt;
    TextEnt.AlignmentPoint = New Point3d(InsPoint)&lt;BR /&gt;
End If&lt;BR /&gt;
{code}</description>
      <pubDate>Mon, 30 Mar 2009 18:36:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/trouble-with-attachmentpoint-topcenter/m-p/2456535#M71241</guid>
      <dc:creator>GTVic</dc:creator>
      <dc:date>2009-03-30T18:36:09Z</dc:date>
    </item>
  </channel>
</rss>

