<?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: Changing position of AttributeDefinition in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/changing-position-of-attributedefinition/m-p/3739021#M51977</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attribute definition and reference are derived classes of DBText, which has two parameters to define its location (Position and AlignmentPoint). The alignment of the text may need to be updated after changing its content, which relates to middle/right horizontal/vertical alignment and font style. To update the text alignment, you need to manually set AlignmentPoint property or call &lt;FONT color="#993300"&gt;attributeDefinition.AdjustAlignment(HostApplicationServices.WorkingDatabase)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Khoa&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 18 Dec 2012 14:42:56 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-12-18T14:42:56Z</dc:date>
    <item>
      <title>Changing position of AttributeDefinition</title>
      <link>https://forums.autodesk.com/t5/net-forum/changing-position-of-attributedefinition/m-p/3738833#M51975</link>
      <description>&lt;P&gt;Hello Forum,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to change the position of an AttributeDefinition in a block, but it nothing is changed:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;foreach (ObjectId oidAttribute in btrBlock)
{
    adOrg = taTransaction.GetObject(oidAttribute, OpenMode.ForRead) as AttributeDefinition;
    if (adOrg != null)
    {
            adOrg.UpgradeOpen();
            adOrg.Position = new Point3d(0, 0, 0);
            // Break;
            break;
    }
    adOrg = null;
}&lt;BR /&gt;...&lt;BR /&gt;Commit();&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;What is wrong? How do I change the position?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Dec 2012 09:16:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/changing-position-of-attributedefinition/m-p/3738833#M51975</guid>
      <dc:creator>Ertqwa</dc:creator>
      <dc:date>2012-12-18T09:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: Changing position of AttributeDefinition</title>
      <link>https://forums.autodesk.com/t5/net-forum/changing-position-of-attributedefinition/m-p/3738884#M51976</link>
      <description>&lt;P&gt;Don't forget to go back thru the blockreferenceid's and update all the block references with the new difinition.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After you change the difinition insert a new block.&amp;nbsp; you will see the new position.&amp;nbsp; But, the old block references do not have that position.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Dec 2012 11:54:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/changing-position-of-attributedefinition/m-p/3738884#M51976</guid>
      <dc:creator>michael_vanhoose</dc:creator>
      <dc:date>2012-12-18T11:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: Changing position of AttributeDefinition</title>
      <link>https://forums.autodesk.com/t5/net-forum/changing-position-of-attributedefinition/m-p/3739021#M51977</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attribute definition and reference are derived classes of DBText, which has two parameters to define its location (Position and AlignmentPoint). The alignment of the text may need to be updated after changing its content, which relates to middle/right horizontal/vertical alignment and font style. To update the text alignment, you need to manually set AlignmentPoint property or call &lt;FONT color="#993300"&gt;attributeDefinition.AdjustAlignment(HostApplicationServices.WorkingDatabase)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Khoa&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Dec 2012 14:42:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/changing-position-of-attributedefinition/m-p/3739021#M51977</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-12-18T14:42:56Z</dc:date>
    </item>
    <item>
      <title>Re: Changing position of AttributeDefinition</title>
      <link>https://forums.autodesk.com/t5/net-forum/changing-position-of-attributedefinition/m-p/3742017#M51978</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;True, but my problem was that I had to change&amp;nbsp;AlignmentPoint.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the response.&lt;/P&gt;</description>
      <pubDate>Sat, 22 Dec 2012 14:01:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/changing-position-of-attributedefinition/m-p/3742017#M51978</guid>
      <dc:creator>Ertqwa</dc:creator>
      <dc:date>2012-12-22T14:01:59Z</dc:date>
    </item>
    <item>
      <title>Re: Changing position of AttributeDefinition</title>
      <link>https://forums.autodesk.com/t5/net-forum/changing-position-of-attributedefinition/m-p/3742018#M51979</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes changing&amp;nbsp;AlignmentPoint does the trick.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 22 Dec 2012 14:02:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/changing-position-of-attributedefinition/m-p/3742018#M51979</guid>
      <dc:creator>Ertqwa</dc:creator>
      <dc:date>2012-12-22T14:02:38Z</dc:date>
    </item>
  </channel>
</rss>

