<?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 Attrubute text alignment problem after update in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/attrubute-text-alignment-problem-after-update/m-p/2624675#M67298</link>
    <description>I am updating a block reference by changing the attribute values. However, the text alignments of the updated block reference is screwed up after the update. I am able to fix it by using the ATTSYNC command at the command line.&lt;BR /&gt;
&lt;BR /&gt;
How can I ensure that the text alignments of the attribute values are properly maintained after they are changed programmatically? Any advice is highly appreciated!&lt;BR /&gt;
&lt;BR /&gt;
Gagan</description>
    <pubDate>Fri, 29 Jan 2010 22:09:27 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2010-01-29T22:09:27Z</dc:date>
    <item>
      <title>Attrubute text alignment problem after update</title>
      <link>https://forums.autodesk.com/t5/net-forum/attrubute-text-alignment-problem-after-update/m-p/2624675#M67298</link>
      <description>I am updating a block reference by changing the attribute values. However, the text alignments of the updated block reference is screwed up after the update. I am able to fix it by using the ATTSYNC command at the command line.&lt;BR /&gt;
&lt;BR /&gt;
How can I ensure that the text alignments of the attribute values are properly maintained after they are changed programmatically? Any advice is highly appreciated!&lt;BR /&gt;
&lt;BR /&gt;
Gagan</description>
      <pubDate>Fri, 29 Jan 2010 22:09:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/attrubute-text-alignment-problem-after-update/m-p/2624675#M67298</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-29T22:09:27Z</dc:date>
    </item>
    <item>
      <title>Re: Attrubute text alignment problem after update</title>
      <link>https://forums.autodesk.com/t5/net-forum/attrubute-text-alignment-problem-after-update/m-p/2624676#M67299</link>
      <description>gagangajabaharia wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; I am updating a block reference by changing the attribute values. &lt;BR /&gt;
&amp;gt; However, the text alignments of the updated block reference is &lt;BR /&gt;
&amp;gt; screwed up after the update.&lt;BR /&gt;
&lt;BR /&gt;
Kean addressed this ...&lt;BR /&gt;
&lt;BR /&gt;
http://through-the-interface.typepad.com/through_the_interface/2007/07/updating-a-sp-1.html&lt;BR /&gt;
&lt;BR /&gt;
... see Update 2 about 1/2 way down!&lt;BR /&gt;
&lt;BR /&gt;
Good Luck, Terry</description>
      <pubDate>Sat, 30 Jan 2010 00:41:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/attrubute-text-alignment-problem-after-update/m-p/2624676#M67299</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-30T00:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: Attrubute text alignment problem after update</title>
      <link>https://forums.autodesk.com/t5/net-forum/attrubute-text-alignment-problem-after-update/m-p/2624677#M67300</link>
      <description>Thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Sat, 30 Jan 2010 02:22:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/attrubute-text-alignment-problem-after-update/m-p/2624677#M67300</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-30T02:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: Attrubute text alignment problem after update</title>
      <link>https://forums.autodesk.com/t5/net-forum/attrubute-text-alignment-problem-after-update/m-p/2624678#M67301</link>
      <description>Ummmm.... I think Kean may be a tad confused.&lt;BR /&gt;
&lt;BR /&gt;
If you are setting the attribute's textstring, you don't&lt;BR /&gt;
have to call AdjustAlignment() because that happens when&lt;BR /&gt;
the textString of database-resident text is changed anyway.&lt;BR /&gt;
&lt;BR /&gt;
AdjustAlignment() was mainly provided to update the&lt;BR /&gt;
alignment of text that hasn't been added to a database&lt;BR /&gt;
yet (like for example, when dragging newly-created text&lt;BR /&gt;
using a jig).&lt;BR /&gt;
&lt;BR /&gt;
That's why it takes a Database parameter. If the text&lt;BR /&gt;
you're changing is already in a database, you don't have&lt;BR /&gt;
to call AdjustAlignment(), you only need to change the&lt;BR /&gt;
WorkingDatabase before/after modifying the textString.&lt;BR /&gt;
&lt;BR /&gt;
{code}&lt;BR /&gt;
&lt;BR /&gt;
   // This is the basic procedure you must use&lt;BR /&gt;
   //  to update text in outboard databases:&lt;BR /&gt;
&lt;BR /&gt;
   Database oldDb = HostApplicationServices.WorkingDatabase;&lt;BR /&gt;
&lt;BR /&gt;
   HostApplicationServices.WorkingDatabase = text.Database;&lt;BR /&gt;
   try&lt;BR /&gt;
   {&lt;BR /&gt;
&lt;BR /&gt;
      text.TextString = newVal;&lt;BR /&gt;
&lt;BR /&gt;
      // you can modify as many text objects as needed&lt;BR /&gt;
      // here, while the database they're from is the current&lt;BR /&gt;
      // working database.&lt;BR /&gt;
&lt;BR /&gt;
   }&lt;BR /&gt;
   finally&lt;BR /&gt;
   {&lt;BR /&gt;
      // This *must* be done or AutoCAD will crash:&lt;BR /&gt;
      HostApplicationServices.WorkingDatabase = oldDb;&lt;BR /&gt;
   }&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
{code}&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD&lt;BR /&gt;
Supporting AutoCAD 2000 through 2010&lt;BR /&gt;
&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");&lt;BR /&gt;
&lt;BR /&gt;
&lt;GAGANGAJABAHARIA&gt; wrote in message news:6327321@discussion.autodesk.com...&lt;BR /&gt;
I am updating a block reference by changing the attribute values. However, the &lt;BR /&gt;
text alignments of the updated block reference is screwed up after the update. I &lt;BR /&gt;
am able to fix it by using the ATTSYNC command at the command line.&lt;BR /&gt;
&lt;BR /&gt;
How can I ensure that the text alignments of the attribute values are properly &lt;BR /&gt;
maintained after they are changed programmatically? Any advice is highly &lt;BR /&gt;
appreciated!&lt;BR /&gt;
&lt;BR /&gt;
Gagan&lt;/GAGANGAJABAHARIA&gt;</description>
      <pubDate>Sat, 30 Jan 2010 12:34:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/attrubute-text-alignment-problem-after-update/m-p/2624678#M67301</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-30T12:34:42Z</dc:date>
    </item>
  </channel>
</rss>

