<?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 How to Offset Dimensions Dynamically from Polyline Based on Annotation Scale in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/how-to-offset-dimensions-dynamically-from-polyline-based-on/m-p/13675002#M85231</link>
    <description>&lt;P&gt;I’m placing &lt;STRONG&gt;aligned dimensions&lt;/STRONG&gt; along polyline segments using the AutoCAD .NET API. Right now, I position each dimension with a fixed perpendicular offset from the polyline, which works fine at first.&lt;/P&gt;&lt;P&gt;However, I’ve made the dimensions annotative to keep the text readable across layout viewports with different scales. As a result, the dimension text grows larger in some viewports, and the fixed offset causes the text to overlap with the polyline.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I’m looking for a way to offset dimensions dynamically based on annotation scale,&lt;SPAN&gt;&amp;nbsp;so the spacing adjusts automatically and keeps the text clear and readable in all viewports.&lt;BR /&gt;&lt;BR /&gt;Any best practices for dimensioning polylines like this when annotation scales are involved?&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Any guidance would be appreciated — thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 10 Jun 2025 15:44:51 GMT</pubDate>
    <dc:creator>santhoshr151194</dc:creator>
    <dc:date>2025-06-10T15:44:51Z</dc:date>
    <item>
      <title>How to Offset Dimensions Dynamically from Polyline Based on Annotation Scale</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-offset-dimensions-dynamically-from-polyline-based-on/m-p/13675002#M85231</link>
      <description>&lt;P&gt;I’m placing &lt;STRONG&gt;aligned dimensions&lt;/STRONG&gt; along polyline segments using the AutoCAD .NET API. Right now, I position each dimension with a fixed perpendicular offset from the polyline, which works fine at first.&lt;/P&gt;&lt;P&gt;However, I’ve made the dimensions annotative to keep the text readable across layout viewports with different scales. As a result, the dimension text grows larger in some viewports, and the fixed offset causes the text to overlap with the polyline.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I’m looking for a way to offset dimensions dynamically based on annotation scale,&lt;SPAN&gt;&amp;nbsp;so the spacing adjusts automatically and keeps the text clear and readable in all viewports.&lt;BR /&gt;&lt;BR /&gt;Any best practices for dimensioning polylines like this when annotation scales are involved?&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Any guidance would be appreciated — thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jun 2025 15:44:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-offset-dimensions-dynamically-from-polyline-based-on/m-p/13675002#M85231</guid>
      <dc:creator>santhoshr151194</dc:creator>
      <dc:date>2025-06-10T15:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to Offset Dimensions Dynamically from Polyline Based on Annotation Scale</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-offset-dimensions-dynamically-from-polyline-based-on/m-p/13677513#M85233</link>
      <description>&lt;P&gt;See if this helps.&amp;nbsp;&amp;nbsp;You can obtain the "Current" annoscale with this.&lt;/P&gt;&lt;DIV&gt;// check the TextStyleTableRecord for annotative&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;acdb.TextStyleTableRecord tstr = (acdb.TextStyleTableRecord)tr.GetObject(mystyleid,&amp;nbsp; &amp;nbsp; acdb.OpenMode.ForRead);&lt;/DIV&gt;&lt;DIV&gt;double tsize = tstr.TextSize;&lt;/DIV&gt;&lt;DIV&gt;if (tsize == 0.0)&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;tsize = 2;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;bool annotative = false;&lt;/DIV&gt;&lt;DIV&gt;if (tstr.Annotative == acdb.AnnotativeStates.True)&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;annotative = true;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;double tsize = tstr.TextSize;&lt;/DIV&gt;&lt;DIV&gt;if (tsize == 0.0)&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;tsize = 2;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;if (annotative)&lt;/DIV&gt;&lt;DIV&gt;{&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;acdb.ObjectContextManager ocm = db.ObjectContextManager;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;acdb.ObjectContextCollection occ = ocm.GetContextCollection("ACDB_ANNOTATIONSCALES");&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;acdb.AnnotationScale asc = (acdb.AnnotationScale)occ.CurrentContext;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;double psunits = asc.PaperUnits;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;double msunits = asc.DrawingUnits;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;double annofactor = 1;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if (asc.Name != "Model")&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; annofactor = msunits / psunits;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;tsize = msunits / psunits * 2;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;}// change size if annotative textstyle&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I use a factor of 2 for calculating the insertion point later on. I create a new point3d by offsetting the midpoint of a line (or linesegment) using "annofactor".&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jun 2025 21:03:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-offset-dimensions-dynamically-from-polyline-based-on/m-p/13677513#M85233</guid>
      <dc:creator>fieldguy</dc:creator>
      <dc:date>2025-06-11T21:03:49Z</dc:date>
    </item>
  </channel>
</rss>

