<?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: Code for retrieve model Annotations in drawing in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/code-for-retrieve-model-annotations-in-drawing/m-p/12590729#M13269</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5365908"&gt;@d_bouvy&lt;/a&gt;.&amp;nbsp; Have you already tried turning this setting on?&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=DrawingView_Include3DAnnotations" target="_blank" rel="noopener"&gt;DrawingView.Include3DAnnotations&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, if those 3D model annotations were not directly created within the main/top assembly, then you would need to dig for the 'real' ones within the components, then get a reference to their 'proxy' representations within the main/top assembly, then gather those proxy versions to be included in the drawing.&amp;nbsp; The 'retrieve' process generally only works for top level stuff in the main model, not for stuff below that level.&lt;/P&gt;</description>
    <pubDate>Thu, 29 Feb 2024 13:16:11 GMT</pubDate>
    <dc:creator>WCrihfield</dc:creator>
    <dc:date>2024-02-29T13:16:11Z</dc:date>
    <item>
      <title>Code for retrieve model Annotations in drawing</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/code-for-retrieve-model-annotations-in-drawing/m-p/12572257#M13266</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a code for retrieving model annotations in the drawing ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2024 21:32:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/code-for-retrieve-model-annotations-in-drawing/m-p/12572257#M13266</guid>
      <dc:creator>richie_rQYQ8U</dc:creator>
      <dc:date>2024-02-20T21:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: Code for retrieve model Annotations in drawing</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/code-for-retrieve-model-annotations-in-drawing/m-p/12573002#M13267</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;This is the Syntax&lt;/P&gt;&lt;P&gt;GeneralDimensions.Retrieve Method&lt;/P&gt;&lt;P class=""&gt;Parent Object: GeneralDimensions&amp;nbsp;&lt;/P&gt;&lt;P&gt;Description&lt;/P&gt;&lt;P class=""&gt;Method that retrieves sketch and/or model dimensions into the drawing.&lt;/P&gt;&lt;P&gt;Syntax&lt;/P&gt;&lt;P&gt;GeneralDimensions.&lt;STRONG&gt;Retrieve&lt;/STRONG&gt;( &lt;STRONG&gt;&lt;I&gt;ViewOrSketch&lt;/I&gt;&lt;/STRONG&gt; As Object, [&lt;STRONG&gt;&lt;I&gt;DimensionsToRetrieve&lt;/I&gt;&lt;/STRONG&gt;] As Variant ) As GeneralDimensionsEnumerator&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, You need a Drawing sheet and Drawing view&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Ex.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDrawView&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;DrawingView&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;CommandManager&lt;/SPAN&gt;.&lt;SPAN&gt;Pick&lt;/SPAN&gt;(&lt;SPAN&gt;SelectionFilterEnum&lt;/SPAN&gt;.&lt;SPAN&gt;kDrawingViewFilter&lt;/SPAN&gt;, &lt;SPAN&gt;"Please select a View, Esc to Cancel "&lt;/SPAN&gt;)
&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oDrawView&lt;/SPAN&gt; &lt;SPAN&gt;Is&lt;/SPAN&gt; &lt;SPAN&gt;Nothing&lt;/SPAN&gt; &lt;SPAN&gt;Then&lt;/SPAN&gt; &lt;SPAN&gt;Exit&lt;/SPAN&gt; &lt;SPAN&gt;Sub&lt;/SPAN&gt; 
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oSheet&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Sheet&lt;/SPAN&gt; = &lt;SPAN&gt;oDrawView&lt;/SPAN&gt;.&lt;SPAN&gt;Parent&lt;/SPAN&gt;

&lt;SPAN&gt;oSheet&lt;/SPAN&gt;.&lt;SPAN&gt;DrawingDimensions&lt;/SPAN&gt;.&lt;SPAN&gt;GeneralDimensions&lt;/SPAN&gt;.&lt;SPAN&gt;Retrieve&lt;/SPAN&gt;(&lt;SPAN&gt;oDrawView&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2024 08:22:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/code-for-retrieve-model-annotations-in-drawing/m-p/12573002#M13267</guid>
      <dc:creator>BM_Ashraf</dc:creator>
      <dc:date>2024-02-21T08:22:18Z</dc:date>
    </item>
    <item>
      <title>Re: Code for retrieve model Annotations in drawing</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/code-for-retrieve-model-annotations-in-drawing/m-p/12590343#M13268</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;It seems impossible to make model annotation of an assembly visible in a drawing with VBA... Is anyone know this ?&lt;/P&gt;&lt;P&gt;The code above put all dimensions of sketches and features, but not model annotations....&lt;/P&gt;</description>
      <pubDate>Thu, 29 Feb 2024 10:30:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/code-for-retrieve-model-annotations-in-drawing/m-p/12590343#M13268</guid>
      <dc:creator>d_bouvy</dc:creator>
      <dc:date>2024-02-29T10:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: Code for retrieve model Annotations in drawing</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/code-for-retrieve-model-annotations-in-drawing/m-p/12590729#M13269</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5365908"&gt;@d_bouvy&lt;/a&gt;.&amp;nbsp; Have you already tried turning this setting on?&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=DrawingView_Include3DAnnotations" target="_blank" rel="noopener"&gt;DrawingView.Include3DAnnotations&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, if those 3D model annotations were not directly created within the main/top assembly, then you would need to dig for the 'real' ones within the components, then get a reference to their 'proxy' representations within the main/top assembly, then gather those proxy versions to be included in the drawing.&amp;nbsp; The 'retrieve' process generally only works for top level stuff in the main model, not for stuff below that level.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Feb 2024 13:16:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/code-for-retrieve-model-annotations-in-drawing/m-p/12590729#M13269</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2024-02-29T13:16:11Z</dc:date>
    </item>
    <item>
      <title>Re: Code for retrieve model Annotations in drawing</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/code-for-retrieve-model-annotations-in-drawing/m-p/12592120#M13270</link>
      <description>&lt;P&gt;Hi Thank you for your reply,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No i didn't try that&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you show me how to do that please?&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2024 00:37:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/code-for-retrieve-model-annotations-in-drawing/m-p/12592120#M13270</guid>
      <dc:creator>richie_rQYQ8U</dc:creator>
      <dc:date>2024-03-01T00:37:03Z</dc:date>
    </item>
    <item>
      <title>Re: Code for retrieve model Annotations in drawing</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/code-for-retrieve-model-annotations-in-drawing/m-p/12593048#M13271</link>
      <description>&lt;P&gt;Sure.&amp;nbsp; Below is a link to a similar post I responded to in a similar way about 2 years ago which contains a very basic iLogic example.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-programming-ilogic/retrieve-3d-dimensions-placed-on-an-assembly-in-a-drawing/m-p/10904845/highlight/true#M133892" target="_blank" rel="noopener"&gt;https://forums.autodesk.com/t5/inventor-programming-ilogic/retrieve-3d-dimensions-placed-on-an-assembly-in-a-drawing/m-p/10904845/highlight/true#M133892&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I can post another example here too.&amp;nbsp; This example will iterate through each sheet, and each view on each sheet, setting that view property to True on each one.&amp;nbsp; I believe this setting is similar to the one you see on the 'Recovery Options' tab of the Drawing View editing dialog, where there is a checkbox named 'All Model Dimensions'.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;Sub Main
	Dim oDDoc As DrawingDocument = TryCast(ThisDoc.Document, Inventor.DrawingDocument)
	If oDDoc Is Nothing Then Logger.Debug(iLogicVb.RuleName &amp;amp; " exited (wrong DocumentType)") : Return
	Dim oSheets As Inventor.Sheets = oDDoc.Sheets
	Dim oASheet As Inventor.Sheet = oDDoc.ActiveSheet 'record originally active sheet
	For Each oSheet As Inventor.Sheet In oSheets
		oSheet.Activate
		Dim oViews As DrawingViews = oSheet.DrawingViews
		If oViews.Count = 0 Then Continue For 'skip to next sheet
		For Each oView As DrawingView In oViews
			'&amp;lt;&amp;lt;&amp;lt; setting that Boolean type property to True here &amp;gt;&amp;gt;&amp;gt;
			oView.Include3DAnnotations = True
		Next 'oView
		oSheet.Update
	Next 'oSheet
	'restore originally active sheet to active again
	If oDDoc.ActiveSheet IsNot oASheet Then
		oASheet.Activate
	End If
End Sub&lt;/LI-CODE&gt;
&lt;P&gt;At the following link, I had also responded to another similar forum post about 3 1/2 years ago where I showed a code way to simulate the manual process of retrieving model annotations in a drawing, but I generally do not recommend using a command execution and SendKeys type routine anymore, due to the inherent dangers of using the SendKeys methods (the keystrokes could potentially get sent to the wrong place, which could have an unknown effect).&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-programming-ilogic/retrieve-model-annotations-ilogic/m-p/9753719/highlight/true#M116033" target="_blank" rel="noopener"&gt;https://forums.autodesk.com/t5/inventor-programming-ilogic/retrieve-model-annotations-ilogic/m-p/9753719/highlight/true#M116033&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are also other forum posts out there on this subject too, which may offer more insights, and different code examples.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this solved your problem, or answered your question, please click &lt;SPAN&gt;&lt;STRONG&gt; ACCEPT SOLUTION &lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;BR /&gt;Or, if this helped you, please click (LIKE or KUDOS) &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2024 12:40:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/code-for-retrieve-model-annotations-in-drawing/m-p/12593048#M13271</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2024-03-01T12:40:21Z</dc:date>
    </item>
    <item>
      <title>Re: Code for retrieve model Annotations in drawing</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/code-for-retrieve-model-annotations-in-drawing/m-p/12609786#M13272</link>
      <description>&lt;P&gt;thank you for your solution &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7812054"&gt;@WCrihfield&lt;/a&gt;&lt;BR /&gt;Good thing is the code is working&lt;BR /&gt;but i can use the code one time next time if i try it&lt;BR /&gt;it was not working&lt;/P&gt;&lt;P&gt;i need to double click the view to get the annotations.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2024 01:06:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/code-for-retrieve-model-annotations-in-drawing/m-p/12609786#M13272</guid>
      <dc:creator>richie_rQYQ8U</dc:creator>
      <dc:date>2024-03-04T01:06:24Z</dc:date>
    </item>
    <item>
      <title>Re: Code for retrieve model Annotations in drawing</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/code-for-retrieve-model-annotations-in-drawing/m-p/12631656#M13273</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, it works !&lt;/P&gt;&lt;P&gt;I don't know why, but with CommandManager.ControlDefinitions.Item("DrawingRetrieveDimsCmd").Execute, dimensions don't appear when I was printing in PDF.&lt;/P&gt;&lt;P&gt;Now it seems great with drawingview.include3Dannotations&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2024 08:55:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/code-for-retrieve-model-annotations-in-drawing/m-p/12631656#M13273</guid>
      <dc:creator>d_bouvy</dc:creator>
      <dc:date>2024-03-11T08:55:24Z</dc:date>
    </item>
  </channel>
</rss>

