<?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: Retrieve dimensions in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/3684380#M134100</link>
    <description>&lt;P&gt;I`d like to share the code I assembled from different pieces (see attached). Configurator works great but I have few problems with the drawing dimensions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I`m not sure how to place flat pattern OAL dim`s, can`t place bend dim`s, not sure how to modify flat pattern placement code so it shows bend extents.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;oView4 = oSheet.DrawingViews.AddBaseView(oPartDoc,oPoint4, ViewScale,kDefaultViewOrientation, kHiddenLineDrawingViewStyle,,, oBaseViewOptions)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Also I`m not sure how to do ordinate dim`s for the holes (horizontal &amp;amp; vertical).&lt;/P&gt;&lt;P&gt;If you`d like to test it out don`t forget to change the template path and name in the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an external rule that I run after drawing creation (see below), it places the dimensions I need.&lt;/P&gt;&lt;PRE&gt;Sub Main
    Dim oDrawDoc As DrawingDocument = ThisDoc.Document
    Dim oSheet As Sheet = oDrawDoc.ActiveSheet
    RetrieveDimByView(oSheet, "VIEW1", "Fr_") ' front view
    RetrieveDimByView(oSheet, "VIEW3", "Rs_") ' right side view
	RetrieveDimByView(oSheet, "VIEW2", "Tv_") ' top view
    'RetrieveDimByView(oSheet, "View3", "RetDTop_")
End Sub

Sub RetrieveDimByView(ByVal oSheet As Sheet, ByVal ViewName As String, ByVal PrefixStr As String)
    Dim oDrawView As DrawingView
    For Each oDrawView In oSheet.DrawingViews
        If oDrawView.Name = ViewName Then
            Exit For
        End If
    Next
    Dim oGeneralDimensionsEnum As GeneralDimensionsEnumerator
    oGeneralDimensionsEnum = oSheet.DrawingDimensions.GeneralDimensions.Retrieve(oDrawView)
    Dim oGeneralDimension As GeneralDimension
    For Each oGeneralDimension In oGeneralDimensionsEnum
        Dim oParameter As Parameter
        Try
            oParameter = oGeneralDimension.RetrievedFrom.Parameter
        Catch
            ' Error to set oParameter.
            ' Go further to delete the dimension.
        End Try
        If oParameter.DrivenBy.count &amp;lt;&amp;gt; 0 Then
            Dim oDrivenByParameter As Parameter
            For Each oDrivenByParameter In oParameter.DrivenBy
                If InStr(oDrivenByParameter.Name, PrefixStr) = 0 Then
                    oGeneralDimension.Delete
                End If
            Next
        Else
            If InStr(oParameter.Name, PrefixStr) = 0 Then
                oGeneralDimension.Delete
            End If
        End If
    Next
    oSheet = Nothing
	
	
	Dim oCommandMgr As CommandManager = _
    ThisApplication.CommandManager

    oCommandMgr.ControlDefinitions.item("DrawingSelectAllInventorDimsCmd").Execute
    oCommandMgr.ControlDefinitions.item("DrawingArrangeDimensionsCmd").Execute
	
End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Would be great to add a code that automatically scales up/down the views and places them on the sheet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help appreciated. Thanks,&lt;/P&gt;</description>
    <pubDate>Fri, 02 Nov 2012 13:57:23 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-11-02T13:57:23Z</dc:date>
    <item>
      <title>Retrieve dimensions</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/3650292#M134083</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to retrieve dimensions in a drawing with ilogic. I found some code in de api help, but i can't figure out how to translate it into a ilogic code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I always use assembly models in these drawing and all the parameters have unique names.&amp;nbsp;So in my drawing i want to retrieve some specific dimensions in a view.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone point me in the right direction? maybe a small sample?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;kind regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;theo&lt;/P&gt;</description>
      <pubDate>Mon, 08 Oct 2012 13:45:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/3650292#M134083</guid>
      <dc:creator>theo_bot</dc:creator>
      <dc:date>2012-10-08T13:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve dimensions</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/3653220#M134084</link>
      <description>&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Calibri"&gt;Hello Theo,&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#000000" face="Calibri"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Calibri"&gt;Here you have a little example how-to retrieve dimensions with a special parameter name in iLogic.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#000000" face="Calibri"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Calibri"&gt;The workflow I use is:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Calibri"&gt;1. Retrieve all dimensions.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Calibri"&gt;2. Iterate through the dimensions.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Calibri"&gt;3. Delete dimensions if not a special parameter.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#000000" face="Calibri"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Calibri"&gt;The special parameter name has a prefix “RetD_” as model / userparameter.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3" color="#000000" face="Calibri"&gt;&amp;nbsp;&lt;IMG alt="RetrieveDimensions illogic Parameter.png" align="center" src="https://forums.autodesk.com/t5/image/serverpage/image-id/39686i1F46332AC6B9FD18/image-size/original?v=mpbl-1&amp;amp;px=-1" title="RetrieveDimensions illogic Parameter.png" border="0" /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3" color="#000000" face="Calibri"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Calibri"&gt;Start code”&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Calibri"&gt;&lt;FONT color="#000000"&gt;Dim &lt;/FONT&gt;oDrawDoc &lt;FONT color="#000000"&gt;As &lt;/FONT&gt;DrawingDocument = ThisDoc.Document&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Calibri"&gt;&lt;FONT color="#000000"&gt;Dim &lt;/FONT&gt;oSheet &lt;FONT color="#000000"&gt;As &lt;/FONT&gt;Sheet = oDrawDoc.ActiveSheet&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Calibri"&gt;&lt;FONT color="#000000"&gt;Dim &lt;/FONT&gt;oDrawView &lt;FONT color="#000000"&gt;As &lt;/FONT&gt;DrawingView = oSheet.DrawingViews(1)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Calibri"&gt;&lt;FONT color="#000000"&gt;Dim &lt;/FONT&gt;oGeneralDimensionsEnum &lt;FONT color="#000000"&gt;As &lt;/FONT&gt;GeneralDimensionsEnumerator&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Calibri"&gt;oGeneralDimensionsEnum = oSheet.DrawingDimensions.GeneralDimensions.Retrieve(oDrawView)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Calibri"&gt;&lt;FONT color="#000000"&gt;Dim &lt;/FONT&gt;PrefixStr &lt;FONT color="#000000"&gt;As String = &lt;/FONT&gt;"RetD_"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Calibri"&gt;&lt;FONT color="#000000"&gt;Dim &lt;/FONT&gt;oGeneralDimension &lt;FONT color="#000000"&gt;As &lt;/FONT&gt;GeneralDimension&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Calibri"&gt;&lt;FONT color="#000000"&gt;For Each &lt;/FONT&gt;oGeneralDimension &lt;FONT color="#000000"&gt;In &lt;/FONT&gt;oGeneralDimensionsEnum&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color="#000000"&gt;Dim &lt;/FONT&gt;oParameter &lt;FONT color="#000000"&gt;As &lt;/FONT&gt;Parameter&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oParameter = oGeneralDimension.RetrievedFrom.Parameter&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color="#000000"&gt;If &lt;/FONT&gt;oParameter.DrivenBy.count &amp;lt;&amp;gt; 0 &lt;FONT color="#000000"&gt;Then&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color="#000000"&gt;Dim &lt;/FONT&gt;oDrivenByParameter &lt;FONT color="#000000"&gt;As &lt;/FONT&gt;Parameter&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color="#000000"&gt;For Each &lt;/FONT&gt;oDrivenByParameter &lt;FONT color="#000000"&gt;In &lt;/FONT&gt;oParameter.DrivenBy&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color="#000000"&gt;If &lt;/FONT&gt;InStr(oDrivenByParameter.Name, PrefixStr) = 0 &lt;FONT color="#000000"&gt;Then&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oGeneralDimension.Delete&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color="#000000"&gt;End If&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color="#000000"&gt;Next&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color="#000000"&gt;Else&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color="#000000"&gt;If &lt;/FONT&gt;InStr(oParameter.Name, PrefixStr) = 0 &lt;FONT color="#000000"&gt;Then&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oGeneralDimension.Delete&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color="#000000"&gt;End If&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color="#000000"&gt;End If&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Calibri"&gt;Next&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Calibri"&gt;“End Code&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Calibri"&gt;I hoop it was use full.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#000000" face="Calibri"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Calibri"&gt;Best regards,&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Oct 2012 06:54:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/3653220#M134084</guid>
      <dc:creator>marco_suurlant</dc:creator>
      <dc:date>2012-10-10T06:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve dimensions</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/3654490#M134085</link>
      <description>&lt;P&gt;Wow!!! That is the great code!!!!&lt;/P&gt;&lt;P&gt;Thank you so much!!!&lt;/P&gt;</description>
      <pubDate>Wed, 10 Oct 2012 20:18:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/3654490#M134085</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-10-10T20:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve dimensions</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/3655018#M134086</link>
      <description>&lt;P&gt;&lt;img id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://forums.autodesk.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Marco,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, it works great!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Houdoe,&lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://forums.autodesk.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;gr Theo&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Oct 2012 08:39:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/3655018#M134086</guid>
      <dc:creator>theo_bot</dc:creator>
      <dc:date>2012-10-11T08:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve dimensions</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/3655276#M134087</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;will this rule delete dimensions&amp;nbsp;by hole features?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it seems not going to work at that way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Oct 2012 12:17:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/3655276#M134087</guid>
      <dc:creator>skyngu</dc:creator>
      <dc:date>2012-10-11T12:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve dimensions</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/3661006#M134088</link>
      <description>&lt;P&gt;I'd suggest you provide a dataset to recreate the problem you met with. This will help the peers here to diagnose.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Oct 2012 10:11:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/3661006#M134088</guid>
      <dc:creator>xiaodong_liang</dc:creator>
      <dc:date>2012-10-16T10:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve dimensions</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/3661152#M134089</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please check attachment. there will be an error when run ilogic rule.&lt;/P&gt;&lt;P&gt;the dimension by hole feature is not going to work.&lt;/P&gt;&lt;P&gt;it is 1/4--20 hole. the diameter of tap drill hole casues the error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks a lot.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Oct 2012 12:06:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/3661152#M134089</guid>
      <dc:creator>skyngu</dc:creator>
      <dc:date>2012-10-16T12:06:50Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve dimensions</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/3661464#M134090</link>
      <description>&lt;P&gt;&lt;FONT size="2"&gt;Hi,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;You were right the code stopped working because the Tapped Hole has no RetrievedFrom.Parameter.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="Calibri"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Here you have the modified code.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" face="Calibri"&gt;Start code”&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;Dim oDrawDoc As DrawingDocument = ThisDoc.Document

Dim oSheet As Sheet = oDrawDoc.ActiveSheet

Dim oDrawView As DrawingView = oSheet.DrawingViews(1)

Dim oGeneralDimensionsEnum As GeneralDimensionsEnumerator
oGeneralDimensionsEnum = oSheet.DrawingDimensions.GeneralDimensions.Retrieve(oDrawView)

Dim oGeneralDimension As GeneralDimension
For Each oGeneralDimension In oGeneralDimensionsEnum
	Dim oParameter As Parameter

	Try
		oParameter = oGeneralDimension.RetrievedFrom.Parameter
	Catch
		' Error to set oParameter.
		' Go further to delete the dimension.
	End Try

    If oParameter.DrivenBy.count &amp;lt;&amp;gt; 0 Then
        Dim oDrivenByParameter As Parameter
        For Each oDrivenByParameter In oParameter.DrivenBy
            If InStr(oDrivenByParameter.Name, "RetD_") = 0 Then
                oGeneralDimension.Delete
            End If
        Next
    Else
        oGeneralDimension.Delete
    End If
Next&lt;/PRE&gt;&lt;P&gt;&lt;FONT size="2" face="Calibri"&gt;“End Code&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;I didn’t test it with your Part because I have now only version 2011.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Best regards,&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Oct 2012 14:17:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/3661464#M134090</guid>
      <dc:creator>marco_suurlant</dc:creator>
      <dc:date>2012-10-16T14:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve dimensions</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/3661826#M134091</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;at the near end of your code, you miss some parts. it should be like this,&lt;/P&gt;&lt;P&gt;&lt;!-- StartFragment --&gt;&lt;/P&gt;&lt;P&gt;If InStr(oParameter.Name, "test_") = 0 Then&lt;/P&gt;&lt;P&gt;oGeneralDimension.Delete&lt;BR /&gt;End If&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;otherwise, the code will delete all dimensions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for your information.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Oct 2012 17:18:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/3661826#M134091</guid>
      <dc:creator>skyngu</dc:creator>
      <dc:date>2012-10-16T17:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve dimensions</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/3661868#M134092</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Hi,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;Something like this:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Dim oDrawDoc As DrawingDocument = ThisDoc.Document

Dim oSheet As Sheet = oDrawDoc.ActiveSheet

Dim oDrawView As DrawingView = oSheet.DrawingViews(1)

Dim oGeneralDimensionsEnum As GeneralDimensionsEnumerator
oGeneralDimensionsEnum = oSheet.DrawingDimensions.GeneralDimensions.Retrieve(oDrawView)

Dim PrefixStr As String = "RetD_"

Dim oGeneralDimension As GeneralDimension
For Each oGeneralDimension In oGeneralDimensionsEnum
    Dim oParameter As Parameter
	Try
		oParameter = oGeneralDimension.RetrievedFrom.Parameter
	Catch
		' Error to set oParameter.
		' Go further to delete the dimension.
	End Try

    If oParameter.DrivenBy.count &amp;lt;&amp;gt; 0 Then
        Dim oDrivenByParameter As Parameter
        For Each oDrivenByParameter In oParameter.DrivenBy
            If InStr(oDrivenByParameter.Name, PrefixStr) = 0 Then
                oGeneralDimension.Delete
            End If
        Next
	Else
        If InStr(oParameter.Name, PrefixStr) = 0 Then
            oGeneralDimension.Delete
        End If
    End If
Next&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Oct 2012 17:46:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/3661868#M134092</guid>
      <dc:creator>marco_suurlant</dc:creator>
      <dc:date>2012-10-16T17:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve dimensions</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/3662120#M134093</link>
      <description>&lt;P&gt;Guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What if I have 3 views and I need to dimension OAL length on the front view, OAL width on the side view, and lets say a hole on the top view. How to modify the code. I tried to play with it, copiyng the part of the code and changing the view name, but it gives me an error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Oct 2012 20:03:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/3662120#M134093</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-10-16T20:03:27Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve dimensions</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/3662824#M134094</link>
      <description>&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Calibri"&gt;Hi,&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Calibri"&gt;Here you have some code that can do that, only thing what you must have do is give the Drawing View a name and give the user / model parameter the right name.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;FONT color="#000000"&gt;&lt;FONT face="Calibri"&gt;&lt;IMG border="0" height="251" width="467" src="https://forums.autodesk.com/t5/image/serverpage/image-id/40308i980FCE70EECD6CA6/image-size/original?v=mpbl-1&amp;amp;px=-1" align="center" title="Drawing View.JPG" alt="Drawing View.JPG" /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Sub Main&lt;BR /&gt;    Dim oDrawDoc As DrawingDocument = ThisDoc.Document&lt;BR /&gt;    Dim oSheet As Sheet = oDrawDoc.ActiveSheet&lt;BR /&gt;    RetrieveDimByView(oSheet, "FrontView", "RetD_")&lt;BR /&gt;    RetrieveDimByView(oSheet, "RightView", "RetDRight_")&lt;BR /&gt;    RetrieveDimByView(oSheet, "TopView", "RetDTop_")&lt;BR /&gt;End Sub&lt;BR /&gt;&lt;BR /&gt;Sub RetrieveDimByView(ByVal oSheet As Sheet, ByVal ViewName As String, ByVal PrefixStr As String)&lt;BR /&gt;    Dim oDrawView As DrawingView&lt;BR /&gt;    For Each oDrawView In oSheet.DrawingViews&lt;BR /&gt;        If oDrawView.Name = ViewName Then&lt;BR /&gt;            Exit For&lt;BR /&gt;        End If&lt;BR /&gt;    Next&lt;BR /&gt;    Dim oGeneralDimensionsEnum As GeneralDimensionsEnumerator&lt;BR /&gt;    oGeneralDimensionsEnum = oSheet.DrawingDimensions.GeneralDimensions.Retrieve(oDrawView)&lt;BR /&gt;    Dim oGeneralDimension As GeneralDimension&lt;BR /&gt;    For Each oGeneralDimension In oGeneralDimensionsEnum&lt;BR /&gt;        Dim oParameter As Parameter&lt;BR /&gt;        Try&lt;BR /&gt;            oParameter = oGeneralDimension.RetrievedFrom.Parameter&lt;BR /&gt;        Catch&lt;BR /&gt;            ' Error to set oParameter.&lt;BR /&gt;            ' Go further to delete the dimension.&lt;BR /&gt;        End Try&lt;BR /&gt;        If oParameter.DrivenBy.count &amp;lt;&amp;gt; 0 Then&lt;BR /&gt;            Dim oDrivenByParameter As Parameter&lt;BR /&gt;            For Each oDrivenByParameter In oParameter.DrivenBy&lt;BR /&gt;                If InStr(oDrivenByParameter.Name, PrefixStr) = 0 Then&lt;BR /&gt;                    oGeneralDimension.Delete&lt;BR /&gt;                End If&lt;BR /&gt;            Next&lt;BR /&gt;        Else&lt;BR /&gt;            If InStr(oParameter.Name, PrefixStr) = 0 Then&lt;BR /&gt;                oGeneralDimension.Delete&lt;BR /&gt;            End If&lt;BR /&gt;        End If&lt;BR /&gt;    Next&lt;BR /&gt;    oSheet = Nothing&lt;BR /&gt;End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2012 09:39:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/3662824#M134094</guid>
      <dc:creator>marco_suurlant</dc:creator>
      <dc:date>2012-10-17T09:39:22Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve dimensions</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/3667024#M134095</link>
      <description>&lt;P&gt;Excellent works just great.&lt;/P&gt;&lt;P&gt;One more question, is there any chance to offset the dimensions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2012 15:50:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/3667024#M134095</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-10-19T15:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve dimensions</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/3668634#M134096</link>
      <description>&lt;P&gt;Hi Marco,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works fine, but my model is based on a multi body part.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So if i retrieve the dimensions, i get the dimensions from every part from my assembly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in the standard interface, i can select a part thats part of the view, how can i do this thru the api?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the API help tells me that you can use a "demensionToRetrive":&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sub Retrieve(ViewOrSketch As IDispatch, ByRef DimensionsToRetrieve As [optional] VARIANT, Result As [out, retval] GeneralDimensionsEnumerator*)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried some to create a ObjectCollection with the specific part, but i doesn't seem to work. Do you have any suggestion.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Theo&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2012 09:46:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/3668634#M134096</guid>
      <dc:creator>theo_bot</dc:creator>
      <dc:date>2012-10-22T09:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve dimensions</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/3669290#M134097</link>
      <description>&lt;P&gt;Hello&amp;nbsp;achmidt,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What you can do is select all dimension and then arrange dimensions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Start code"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim oCommandMgr As CommandManager = _&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ThisApplication.CommandManager&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oCommandMgr.ControlDefinitions.item("DrawingSelectAllInventorDimsCmd").Execute&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oCommandMgr.ControlDefinitions.item("DrawingArrangeDimensionsCmd").Execute&lt;/P&gt;&lt;P&gt;"End code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;!-- StartFragment --&gt;&lt;/P&gt;&lt;P&gt;&lt;!-- EndFragment --&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2012 16:51:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/3669290#M134097</guid>
      <dc:creator>marco_suurlant</dc:creator>
      <dc:date>2012-10-22T16:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve dimensions</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/3670032#M134098</link>
      <description>&lt;P&gt;Hello Theo,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want to make a collection of a Part you can do something like this,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Dim oAssemblyDocument As Inventor.AssemblyDocument = _
	oDrawView.ReferencedDocumentDescriptor.ReferencedDocument

Dim oOcc As Inventor.ComponentOccurrence = _
	oAssemblyDocument.ComponentDefinition.occurrences.item(1)

Dim oGeneralDimensionsObj As ObjectCollection = _
	oSheet.DrawingDimensions.GeneralDimensions.GetRetrievableDimensions(oDrawView, oOcc)&lt;/PRE&gt;&lt;P&gt;The oGeneralDimensionsObj has now the retrieved dimensions form the first Part.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2012 07:33:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/3670032#M134098</guid>
      <dc:creator>marco_suurlant</dc:creator>
      <dc:date>2012-10-23T07:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve dimensions</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/3683310#M134099</link>
      <description>&lt;P&gt;Thanks!!!&lt;/P&gt;</description>
      <pubDate>Thu, 01 Nov 2012 20:03:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/3683310#M134099</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-11-01T20:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve dimensions</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/3684380#M134100</link>
      <description>&lt;P&gt;I`d like to share the code I assembled from different pieces (see attached). Configurator works great but I have few problems with the drawing dimensions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I`m not sure how to place flat pattern OAL dim`s, can`t place bend dim`s, not sure how to modify flat pattern placement code so it shows bend extents.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;oView4 = oSheet.DrawingViews.AddBaseView(oPartDoc,oPoint4, ViewScale,kDefaultViewOrientation, kHiddenLineDrawingViewStyle,,, oBaseViewOptions)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Also I`m not sure how to do ordinate dim`s for the holes (horizontal &amp;amp; vertical).&lt;/P&gt;&lt;P&gt;If you`d like to test it out don`t forget to change the template path and name in the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an external rule that I run after drawing creation (see below), it places the dimensions I need.&lt;/P&gt;&lt;PRE&gt;Sub Main
    Dim oDrawDoc As DrawingDocument = ThisDoc.Document
    Dim oSheet As Sheet = oDrawDoc.ActiveSheet
    RetrieveDimByView(oSheet, "VIEW1", "Fr_") ' front view
    RetrieveDimByView(oSheet, "VIEW3", "Rs_") ' right side view
	RetrieveDimByView(oSheet, "VIEW2", "Tv_") ' top view
    'RetrieveDimByView(oSheet, "View3", "RetDTop_")
End Sub

Sub RetrieveDimByView(ByVal oSheet As Sheet, ByVal ViewName As String, ByVal PrefixStr As String)
    Dim oDrawView As DrawingView
    For Each oDrawView In oSheet.DrawingViews
        If oDrawView.Name = ViewName Then
            Exit For
        End If
    Next
    Dim oGeneralDimensionsEnum As GeneralDimensionsEnumerator
    oGeneralDimensionsEnum = oSheet.DrawingDimensions.GeneralDimensions.Retrieve(oDrawView)
    Dim oGeneralDimension As GeneralDimension
    For Each oGeneralDimension In oGeneralDimensionsEnum
        Dim oParameter As Parameter
        Try
            oParameter = oGeneralDimension.RetrievedFrom.Parameter
        Catch
            ' Error to set oParameter.
            ' Go further to delete the dimension.
        End Try
        If oParameter.DrivenBy.count &amp;lt;&amp;gt; 0 Then
            Dim oDrivenByParameter As Parameter
            For Each oDrivenByParameter In oParameter.DrivenBy
                If InStr(oDrivenByParameter.Name, PrefixStr) = 0 Then
                    oGeneralDimension.Delete
                End If
            Next
        Else
            If InStr(oParameter.Name, PrefixStr) = 0 Then
                oGeneralDimension.Delete
            End If
        End If
    Next
    oSheet = Nothing
	
	
	Dim oCommandMgr As CommandManager = _
    ThisApplication.CommandManager

    oCommandMgr.ControlDefinitions.item("DrawingSelectAllInventorDimsCmd").Execute
    oCommandMgr.ControlDefinitions.item("DrawingArrangeDimensionsCmd").Execute
	
End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Would be great to add a code that automatically scales up/down the views and places them on the sheet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help appreciated. Thanks,&lt;/P&gt;</description>
      <pubDate>Fri, 02 Nov 2012 13:57:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/3684380#M134100</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-11-02T13:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve dimensions</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/5163751#M134101</link>
      <description>&lt;P&gt;&lt;U&gt;The Following code suggested by you is performing the necessary action but ends with "Unexpected error".&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Also it is retrieving the dimension without the special characters like "RteD_". Please guide me.&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Dim oDrawDoc As DrawingDocument = ThisDoc.Document&lt;BR /&gt;&lt;BR /&gt;Dim oSheet As Sheet = oDrawDoc.ActiveSheet&lt;BR /&gt;&lt;BR /&gt;Dim oDrawView As DrawingView = oSheet.DrawingViews(1)&lt;BR /&gt;&lt;BR /&gt;Dim oGeneralDimensionsEnum As GeneralDimensionsEnumerator&lt;BR /&gt;oGeneralDimensionsEnum = oSheet.DrawingDimensions.GeneralDimensions.Retrieve(oDrawView)&lt;BR /&gt;&lt;BR /&gt;Dim PrefixStr As String = "RetD_"&lt;BR /&gt;&lt;BR /&gt;Dim oGeneralDimension As GeneralDimension&lt;BR /&gt;For Each oGeneralDimension In oGeneralDimensionsEnum&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim oParameter As Parameter&lt;BR /&gt;Try&lt;BR /&gt;oParameter = oGeneralDimension.RetrievedFrom.Parameter&lt;BR /&gt;Catch&lt;BR /&gt;' Error to set oParameter.&lt;BR /&gt;' Go further to delete the dimension.&lt;BR /&gt;End Try&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If oParameter.DrivenBy.count &amp;lt;&amp;gt; 0 Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim oDrivenByParameter As Parameter&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For Each oDrivenByParameter In oParameter.DrivenBy&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If InStr(oDrivenByParameter.Name, PrefixStr) = 0 Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oGeneralDimension.Delete&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next&lt;BR /&gt;Else&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If InStr(oParameter.Name, PrefixStr) = 0 Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oGeneralDimension.Delete&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;BR /&gt;Next&lt;/U&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jul 2014 09:40:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/5163751#M134101</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-07-21T09:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve dimensions</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/5166159#M134102</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tested the code on my side and it is working, the test part is included.&lt;/P&gt;&lt;P&gt;If it is still not working can you include the part.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jul 2014 08:59:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/retrieve-dimensions/m-p/5166159#M134102</guid>
      <dc:creator>marco_suurlant</dc:creator>
      <dc:date>2014-07-22T08:59:26Z</dc:date>
    </item>
  </channel>
</rss>

