<?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 do I retrieve a drawing dimension value with iLogic? in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-do-i-retrieve-a-drawing-dimension-value-with-ilogic/m-p/5772105#M116115</link>
    <description>&lt;P&gt;I am writing a piece of code that will add text to a dimension. The added text will vary depending on the dimension value. The dimension is the distance between 2 end-holes of a series of equally spaced holes. For example: a series of 11 holes at 2.00 spacing will have a dimension of 20.00. I want to select the&amp;nbsp;dimension, have iLogic to prompt for the hole-to-hole spacing, calculate&amp;nbsp;the&amp;nbsp;count and then add the text to the dimension ("&lt;SPAN&gt;10 EQ SP&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;@ 2.00 = ")&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The final dimension with the added text will look like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;10 EQ SP&amp;nbsp;@ 2.00 = 20.00&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The critical step I am unable to solve is: getting the dimension &lt;U&gt;value&lt;/U&gt; so I can perform the calculation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I suppose it would be even better if I could window around the set of holes and dimension and have iLogic count them, calculate the spacing and add the text without prompting, but I'll settle for one step at a time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(BTW, I know I stated there are 11 holes, that means there are 10 spaces. We state number of &lt;U&gt;spaces&lt;/U&gt; so that the note reads like an equation (i.e. 10 x 2 = 20).)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dale&lt;/P&gt;</description>
    <pubDate>Fri, 14 Aug 2015 18:52:42 GMT</pubDate>
    <dc:creator>DALEROBERTSON1160</dc:creator>
    <dc:date>2015-08-14T18:52:42Z</dc:date>
    <item>
      <title>How do I retrieve a drawing dimension value with iLogic?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-do-i-retrieve-a-drawing-dimension-value-with-ilogic/m-p/5772105#M116115</link>
      <description>&lt;P&gt;I am writing a piece of code that will add text to a dimension. The added text will vary depending on the dimension value. The dimension is the distance between 2 end-holes of a series of equally spaced holes. For example: a series of 11 holes at 2.00 spacing will have a dimension of 20.00. I want to select the&amp;nbsp;dimension, have iLogic to prompt for the hole-to-hole spacing, calculate&amp;nbsp;the&amp;nbsp;count and then add the text to the dimension ("&lt;SPAN&gt;10 EQ SP&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;@ 2.00 = ")&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The final dimension with the added text will look like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;10 EQ SP&amp;nbsp;@ 2.00 = 20.00&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The critical step I am unable to solve is: getting the dimension &lt;U&gt;value&lt;/U&gt; so I can perform the calculation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I suppose it would be even better if I could window around the set of holes and dimension and have iLogic count them, calculate the spacing and add the text without prompting, but I'll settle for one step at a time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(BTW, I know I stated there are 11 holes, that means there are 10 spaces. We state number of &lt;U&gt;spaces&lt;/U&gt; so that the note reads like an equation (i.e. 10 x 2 = 20).)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dale&lt;/P&gt;</description>
      <pubDate>Fri, 14 Aug 2015 18:52:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-do-i-retrieve-a-drawing-dimension-value-with-ilogic/m-p/5772105#M116115</guid>
      <dc:creator>DALEROBERTSON1160</dc:creator>
      <dc:date>2015-08-14T18:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: How do I retrieve a drawing dimension value with iLogic?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-do-i-retrieve-a-drawing-dimension-value-with-ilogic/m-p/5773784#M116116</link>
      <description>&lt;P&gt;You should use GeneralDImension.ModelValue property to get the dimension value.&lt;/P&gt;
&lt;P&gt;It returns the dimension value in database units as defined in the model or as measured in the drawing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Sub GetDimValue()
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim oDoc As DrawingDocument
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oDoc = ThisApplication.ActiveDocument
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim oSheet As Sheet
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oSheet = oDoc.ActiveSheet
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim oView As DrawingView
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oView = oSheet.DrawingViews.Item(1)
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim oGeneralDimensions As GeneralDimensions
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oGeneralDimensions = oSheet.DrawingDimensions.GeneralDimensions
&amp;nbsp;&amp;nbsp;&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 'get the reference to some dimension
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim oDim As GeneralDimension
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oDim = oGeneralDimensions.Item(3)
&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Debug.Print oDim.&lt;FONT color="#800000"&gt;ModelValue&lt;/FONT&gt;&amp;nbsp; ' in base units (e.g., cm)
&amp;nbsp;&amp;nbsp;&amp;nbsp; Debug.Print oDim.&lt;FONT color="#800000"&gt;ModelValueOverridden&lt;/FONT&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Debug.Print oDim.&lt;FONT color="#800000"&gt;Text.Text&lt;/FONT&gt;
&amp;nbsp;
End Sub&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2015 11:55:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-do-i-retrieve-a-drawing-dimension-value-with-ilogic/m-p/5773784#M116116</guid>
      <dc:creator>Vladimir.Ananyev</dc:creator>
      <dc:date>2015-08-17T11:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: How do I retrieve a drawing dimension value with iLogic?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-do-i-retrieve-a-drawing-dimension-value-with-ilogic/m-p/5773986#M116117</link>
      <description>&lt;P&gt;Thanks Vladimir! I was very close with the code I have. The essential component&amp;nbsp;was the ".Text" of:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;"oDim.Text&lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;.Text&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I studied the "Inventor 2014 API Object Model" but I couldn't quite nail down the syntax.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dale&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2015 13:40:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-do-i-retrieve-a-drawing-dimension-value-with-ilogic/m-p/5773986#M116117</guid>
      <dc:creator>DALEROBERTSON1160</dc:creator>
      <dc:date>2015-08-17T13:40:21Z</dc:date>
    </item>
    <item>
      <title>Re: How do I retrieve a drawing dimension value with iLogic?</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/how-do-i-retrieve-a-drawing-dimension-value-with-ilogic/m-p/6931927#M116118</link>
      <description>&lt;P&gt;That's cool, thanks. &amp;nbsp;I can't seem to figure out how you find what item number a particular drawing dimension is (other than trial and error). &amp;nbsp;It seems like it is only accessible in the dimensions set, and nothing like that exists for a specific dimension. &amp;nbsp;Is there any way to directly check a dimension's item number so that you can refer to it specifically in code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2017 20:39:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/how-do-i-retrieve-a-drawing-dimension-value-with-ilogic/m-p/6931927#M116118</guid>
      <dc:creator>metamere</dc:creator>
      <dc:date>2017-03-08T20:39:12Z</dc:date>
    </item>
  </channel>
</rss>

