<?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: Annotate component part numbers without leaders in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/annotate-component-part-numbers-without-leaders/m-p/10766484#M43555</link>
    <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8098075"&gt;@mat_hijs&lt;/a&gt;&amp;nbsp;I would agree that yes it is more work if you have to do it a lot, I was mainly just pointing out to&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1104556"&gt;@Michael.Navara&lt;/a&gt;&amp;nbsp;that you can actually delete a leader from a standard balloon. We have tried to automate this but haven't had much luck.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Nov 2021 15:52:05 GMT</pubDate>
    <dc:creator>Jason.Rugg</dc:creator>
    <dc:date>2021-11-18T15:52:05Z</dc:date>
    <item>
      <title>Annotate component part numbers without leaders</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/annotate-component-part-numbers-without-leaders/m-p/10756617#M43545</link>
      <description>&lt;P&gt;I'm looking for a way to annotate the part numbers of components in an assembly on a drawing.&lt;/P&gt;&lt;P&gt;My goal is to have an annotation which is placed on the center of the component without a leader, &lt;SPAN&gt;comparable&lt;/SPAN&gt; to Revit. Basically a balloon, attached to the center of a component, and without a leader.&lt;/P&gt;&lt;P&gt;From what I understand balloons in Inventor are always attached to an edge, and the only way to have a balloon without a leader is by placing the balloon itself right on the arrow. This is not exactly what I want, since I don't really want it attached to an edge.&lt;/P&gt;&lt;P&gt;I've thought about using leader notes or sketch symbols, but I'm not sure what woud be my best bet.&lt;/P&gt;&lt;P&gt;The end goal would be to have a tool like auto balloon, but have it place annotations on the components instead of placing them around the assembly using leaders.&lt;/P&gt;&lt;P&gt;Keeping the link between part number and annotation is a must.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone has an idea where to go with this?&lt;/P&gt;</description>
      <pubDate>Sun, 14 Nov 2021 19:05:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/annotate-component-part-numbers-without-leaders/m-p/10756617#M43545</guid>
      <dc:creator>mat_hijs</dc:creator>
      <dc:date>2021-11-14T19:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: Annotate component part numbers without leaders</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/annotate-component-part-numbers-without-leaders/m-p/10757436#M43546</link>
      <description>&lt;P&gt;If you use skeched symbols in a drawing, you can place them with a invisible leader. This keeps your symbol linked to the component that you want to reference. you can reposition the symbol but no leader will be visible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="theobot_0-1636966526644.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/989588i7ED4ACD4452157F9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="theobot_0-1636966526644.png" alt="theobot_0-1636966526644.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Nov 2021 08:55:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/annotate-component-part-numbers-without-leaders/m-p/10757436#M43546</guid>
      <dc:creator>theo.bot</dc:creator>
      <dc:date>2021-11-15T08:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: Annotate component part numbers without leaders</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/annotate-component-part-numbers-without-leaders/m-p/10757447#M43547</link>
      <description>&lt;P&gt;You are not able to remove a leader from balloon, but you can set leader style of balloon to "almost" hidden (No arrow, line style doted) In this case you can use standard balloon for annotation. Inventor has connected component and the visual style is acceptable for viewing or printing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="michaelnavara_0-1636966795942.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/989590i6FFA0DE19CC3B136/image-size/medium?v=v2&amp;amp;px=400" role="button" title="michaelnavara_0-1636966795942.png" alt="michaelnavara_0-1636966795942.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Sorry for printscreen from CZ version&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="michaelnavara_1-1636966909063.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/989591i3516D35FAF3860A0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="michaelnavara_1-1636966909063.png" alt="michaelnavara_1-1636966909063.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Nov 2021 09:01:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/annotate-component-part-numbers-without-leaders/m-p/10757447#M43547</guid>
      <dc:creator>Michael.Navara</dc:creator>
      <dc:date>2021-11-15T09:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: Annotate component part numbers without leaders</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/annotate-component-part-numbers-without-leaders/m-p/10757467#M43548</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4152283"&gt;@theo.bot&lt;/a&gt;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1104556"&gt;@Michael.Navara&lt;/a&gt;&amp;nbsp;Both these options seem to be able to achieve more or less the result I want for an annotation. But is there a possibility to place these in bulk and have them placed at the center of the model? So like the auto balloon function, but have every balloon or sketch symbol placed at the center of the model it's referencing.&lt;/P&gt;&lt;P&gt;I would like to be able to run a rule (or macro) that does exactly this.&lt;/P&gt;&lt;P&gt;I would imagine I'd have to somehow loop through each occurrence that's visible in the selected view and add my annotation to them, but every example I've found so far uses a drawing curve to place the annotation and uses that drawing curve to find out which occurrence it is. I believe I want to do the opposite, find the occurrence and then attach to a drawing curve from that model, and then somehow place the annotation at the center of the model.&lt;/P&gt;&lt;P&gt;If any of you could help me get started with this that would be great!&lt;/P&gt;</description>
      <pubDate>Mon, 15 Nov 2021 09:13:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/annotate-component-part-numbers-without-leaders/m-p/10757467#M43548</guid>
      <dc:creator>mat_hijs</dc:creator>
      <dc:date>2021-11-15T09:13:54Z</dc:date>
    </item>
    <item>
      <title>Re: Annotate component part numbers without leaders</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/annotate-component-part-numbers-without-leaders/m-p/10759685#M43549</link>
      <description>&lt;P&gt;I'm going with sketch symbols now as this seemed to be the most flexible way of doing this. I'm at a point where I can loop through each occurrence, create a sketch symbol and place it on the center of mass.&lt;/P&gt;&lt;P&gt;My first issue is that the sketch symbol isn't attached to the occurrence yet, so they all just show the part number of the main assembly. I'm trying to figure out how to get the geometry intent without having to manually select a drawing curve segment.&lt;/P&gt;&lt;P&gt;My second issue is that this will loop through all occurrences, whether they are visible in that view or not, and annotate them, there should probably be some kind of check to see if that occurrence is visible in that view.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the code I've got so far:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;'[ Define properties of the Sketch Symbol&lt;/SPAN&gt;
&lt;SPAN&gt;' Define the name of the Sketch Symbol Definition&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;sSketchSymbolDef&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; = &lt;SPAN&gt;"Part Number"&lt;/SPAN&gt;

&lt;SPAN&gt;' Define the rotation of the Sketch Symbol&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oRotation&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Double&lt;/SPAN&gt; = 0

&lt;SPAN&gt;' Define the scale of the Sketch Symbol&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oScale&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Double&lt;/SPAN&gt; = 1

&lt;SPAN&gt;'Define whether the Sketch Symbol is static or not&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;bStatic&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Boolean&lt;/SPAN&gt; = &lt;SPAN&gt;True&lt;/SPAN&gt;
&lt;SPAN&gt;']&lt;/SPAN&gt;

&lt;SPAN&gt;' Set a reference to the Drawing Document&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDrawingDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;DrawingDocument&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveDocument&lt;/SPAN&gt;

&lt;SPAN&gt;' Set a reference to the Active Sheet&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;oDrawingDoc&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveSheet&lt;/SPAN&gt;

&lt;SPAN&gt;' Set a reference to the selected Drawing View&lt;/SPAN&gt;
&lt;SPAN&gt;'Dim oDrawingView As DrawingView = ActiveSheet.View("VIEW1").View ' Use this line instead of the next one to select Drawing View based on the name&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDrawingView&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;kDrawingViewFilter&lt;/SPAN&gt;, &lt;SPAN&gt;"Select Drawing View"&lt;/SPAN&gt;) &lt;SPAN&gt;' Use this line instead of the prevous one to select Drawing View while running the rule&lt;/SPAN&gt;

&lt;SPAN&gt;' Set a reference to the main assembly referenced by the Drawing View&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oMainAsm&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;AssemblyDocument&lt;/SPAN&gt; = &lt;SPAN&gt;oDrawingView&lt;/SPAN&gt;.&lt;SPAN&gt;ReferencedDocumentDescriptor&lt;/SPAN&gt;.&lt;SPAN&gt;ReferencedDocument&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oMainAsmCompDef&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;AssemblyComponentDefinition&lt;/SPAN&gt; = &lt;SPAN&gt;oMainAsm&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;

&lt;SPAN&gt;' Loop through all top level occurrences in the main assembly&lt;/SPAN&gt;
&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;i&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Integer&lt;/SPAN&gt; = 1 &lt;SPAN&gt;To&lt;/SPAN&gt; &lt;SPAN&gt;oMainAsmCompDef&lt;/SPAN&gt;.&lt;SPAN&gt;Occurrences&lt;/SPAN&gt;.&lt;SPAN&gt;Count&lt;/SPAN&gt;
	&lt;SPAN&gt;' Set a reference to the Component Occurrence&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oOcc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;ComponentOccurrence&lt;/SPAN&gt; = &lt;SPAN&gt;oMainAsmCompDef&lt;/SPAN&gt;.&lt;SPAN&gt;Occurrences&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;i&lt;/SPAN&gt;)
	
	&lt;SPAN&gt;' Set a reference to the centerpoint of the model&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oOccCenterPoint&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Point&lt;/SPAN&gt; = &lt;SPAN&gt;oOcc&lt;/SPAN&gt;.&lt;SPAN&gt;MassProperties&lt;/SPAN&gt;.&lt;SPAN&gt;CenterOfMass&lt;/SPAN&gt;
	
	&lt;SPAN&gt;' Convert the centerpoint of the model to a point on the sheet&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oPositionPoint&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Point2d&lt;/SPAN&gt; = &lt;SPAN&gt;oDrawingView&lt;/SPAN&gt;.&lt;SPAN&gt;ModelToSheetSpace&lt;/SPAN&gt;(&lt;SPAN&gt;oOccCenterPoint&lt;/SPAN&gt;)

	&lt;SPAN&gt;' Set a reference to the Sketch Symbol Definition&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oSketchSymbolDef&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;SketchedSymbolDefinition&lt;/SPAN&gt; = &lt;SPAN&gt;oDrawingDoc&lt;/SPAN&gt;.&lt;SPAN&gt;SketchedSymbolDefinitions&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;sSketchSymbolDef&lt;/SPAN&gt;)

	&lt;SPAN&gt;' Place a Sketch Symbol&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oSketchSymbol&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;SketchedSymbol&lt;/SPAN&gt; = &lt;SPAN&gt;oSheet&lt;/SPAN&gt;.&lt;SPAN&gt;SketchedSymbols&lt;/SPAN&gt;.&lt;SPAN&gt;Add&lt;/SPAN&gt;(&lt;SPAN&gt;oSketchSymbolDef&lt;/SPAN&gt;, &lt;SPAN&gt;oPositionPoint&lt;/SPAN&gt;, &lt;SPAN&gt;oRotationDegrees&lt;/SPAN&gt; * &lt;SPAN&gt;PI&lt;/SPAN&gt; / 180, &lt;SPAN&gt;oScale&lt;/SPAN&gt;)
		&lt;SPAN&gt;oSketchSymbol&lt;/SPAN&gt;.&lt;SPAN&gt;Static&lt;/SPAN&gt; = &lt;SPAN&gt;bStatic&lt;/SPAN&gt;
&lt;SPAN&gt;Next&lt;/SPAN&gt;
&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Nov 2021 07:00:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/annotate-component-part-numbers-without-leaders/m-p/10759685#M43549</guid>
      <dc:creator>mat_hijs</dc:creator>
      <dc:date>2021-11-16T07:00:02Z</dc:date>
    </item>
    <item>
      <title>Betreff: Annotate component part numbers without leaders</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/annotate-component-part-numbers-without-leaders/m-p/10759876#M43550</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Simpliest way would be try to get DrawingCurves(oOcc). If none occurrence ist not visible, otherwise pick on the drawingcurves for your geometryintent.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Nov 2021 08:58:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/annotate-component-part-numbers-without-leaders/m-p/10759876#M43550</guid>
      <dc:creator>Ralf_Krieg</dc:creator>
      <dc:date>2021-11-16T08:58:18Z</dc:date>
    </item>
    <item>
      <title>Betreff: Annotate component part numbers without leaders</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/annotate-component-part-numbers-without-leaders/m-p/10760304#M43551</link>
      <description>&lt;P&gt;You also need to add a leader to your symbol to connect it to your component. Like&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/564136"&gt;@Ralf_Krieg&lt;/a&gt;&amp;nbsp; mentioned you can use the drawing curve from the occurrence.&lt;BR /&gt;Here is a sample, you might tweak the code and need add some additional checks in the code.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;DrawingDocument&lt;/SPAN&gt;
&lt;SPAN&gt;oDoc&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;

&lt;SPAN&gt;' Set a reference to Active sheet&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;oSheet&lt;/SPAN&gt; = &lt;SPAN&gt;oDoc&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveSheet&lt;/SPAN&gt;

&lt;SPAN&gt;' Set a reference to first Drawing view&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oView&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;DrawingView&lt;/SPAN&gt;
&lt;SPAN&gt;oView&lt;/SPAN&gt; = &lt;SPAN&gt;oSheet&lt;/SPAN&gt;.&lt;SPAN&gt;DrawingViews&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(1)

&lt;SPAN&gt;' Set a reference to the TransientGeometry object.&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oTG&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;TransientGeometry&lt;/SPAN&gt;
&lt;SPAN&gt;oTG&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;TransientGeometry&lt;/SPAN&gt;

&lt;SPAN&gt;'create a object collection for leader points&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oLeaderPoints&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;ObjectCollection&lt;/SPAN&gt;
&lt;SPAN&gt;oLeaderPoints&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;TransientObjects&lt;/SPAN&gt;.&lt;SPAN&gt;CreateObjectCollection&lt;/SPAN&gt;

&lt;SPAN&gt;' Set a reference to the main assembly referenced by the Drawing View&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oMainAsm&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;AssemblyDocument&lt;/SPAN&gt; = &lt;SPAN&gt;oView&lt;/SPAN&gt;.&lt;SPAN&gt;ReferencedDocumentDescriptor&lt;/SPAN&gt;.&lt;SPAN&gt;ReferencedDocument&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oMainAsmCompDef&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;AssemblyComponentDefinition&lt;/SPAN&gt; = &lt;SPAN&gt;oMainAsm&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;
&lt;SPAN&gt;Logger&lt;/SPAN&gt;.&lt;SPAN&gt;Info&lt;/SPAN&gt;(&lt;SPAN&gt;oMainAsm&lt;/SPAN&gt;.&lt;SPAN&gt;DisplayName&lt;/SPAN&gt;)
&lt;SPAN&gt;' Loop through all top level occurrences in the main assembly&lt;/SPAN&gt;
&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;i&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Integer&lt;/SPAN&gt; = 1 &lt;SPAN&gt;To&lt;/SPAN&gt; &lt;SPAN&gt;oMainAsmCompDef&lt;/SPAN&gt;.&lt;SPAN&gt;Occurrences&lt;/SPAN&gt;.&lt;SPAN&gt;Count&lt;/SPAN&gt;
	
	&lt;SPAN&gt;' Set a reference to the Component Occurrence&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oOcc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;ComponentOccurrence&lt;/SPAN&gt; = &lt;SPAN&gt;oMainAsmCompDef&lt;/SPAN&gt;.&lt;SPAN&gt;Occurrences&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;i&lt;/SPAN&gt;)
&lt;SPAN&gt;logger&lt;/SPAN&gt;.&lt;SPAN&gt;Info&lt;/SPAN&gt;(&lt;SPAN&gt;oOcc&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt;)
		&lt;SPAN&gt;' Set a reference to the centerpoint of the model&lt;/SPAN&gt;
		&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oOccCenterPoint&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Point&lt;/SPAN&gt; = &lt;SPAN&gt;oOcc&lt;/SPAN&gt;.&lt;SPAN&gt;MassProperties&lt;/SPAN&gt;.&lt;SPAN&gt;CenterOfMass&lt;/SPAN&gt;

		&lt;SPAN&gt;' Convert the centerpoint of the model to a point on the sheet&lt;/SPAN&gt;
		&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oPositionPoint&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Point2d&lt;/SPAN&gt; = &lt;SPAN&gt;oView&lt;/SPAN&gt;.&lt;SPAN&gt;ModelToSheetSpace&lt;/SPAN&gt;(&lt;SPAN&gt;oOccCenterPoint&lt;/SPAN&gt;)

		&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oView&lt;/SPAN&gt;.&lt;SPAN&gt;DrawingCurves&lt;/SPAN&gt;(&lt;SPAN&gt;oOcc&lt;/SPAN&gt;).&lt;SPAN&gt;Count&lt;/SPAN&gt; &amp;lt;&amp;gt; 0 &lt;SPAN&gt;Then&lt;/SPAN&gt;

			&lt;SPAN&gt;oLeaderPoints&lt;/SPAN&gt;.&lt;SPAN&gt;Clear&lt;/SPAN&gt;

			&lt;SPAN&gt;' The found curve is a drawing curve segment so we need to get the drawing curve.&lt;/SPAN&gt;
			&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;curve&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;DrawingCurve&lt;/SPAN&gt; = &lt;SPAN&gt;oView&lt;/SPAN&gt;.&lt;SPAN&gt;DrawingCurves&lt;/SPAN&gt;(&lt;SPAN&gt;oOcc&lt;/SPAN&gt;).&lt;SPAN&gt;Item&lt;/SPAN&gt;(1)
			
			&lt;SPAN&gt;'Get the midpoint from the curve&lt;/SPAN&gt;
			&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oGI1&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;GeometryIntent&lt;/SPAN&gt;
			&lt;SPAN&gt;oGI1&lt;/SPAN&gt; = &lt;SPAN&gt;oDoc&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveSheet&lt;/SPAN&gt;.&lt;SPAN&gt;CreateGeometryIntent&lt;/SPAN&gt;(&lt;SPAN&gt;curve&lt;/SPAN&gt;, &lt;SPAN&gt;kCenterPointIntent&lt;/SPAN&gt;)

			&lt;SPAN&gt;oLeaderPoints&lt;/SPAN&gt;.&lt;SPAN&gt;Add&lt;/SPAN&gt;(&lt;SPAN&gt;oPositionPoint&lt;/SPAN&gt;)
			&lt;SPAN&gt;oLeaderPoints&lt;/SPAN&gt;.&lt;SPAN&gt;Add&lt;/SPAN&gt;(&lt;SPAN&gt;oGI1&lt;/SPAN&gt;)

			&lt;SPAN&gt;' Set a reference to the Sketch Symbol Definition&lt;/SPAN&gt;
			&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oSketchSymbolDef&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;SketchedSymbolDefinition&lt;/SPAN&gt; = &lt;SPAN&gt;oDoc&lt;/SPAN&gt;.&lt;SPAN&gt;SketchedSymbolDefinitions&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"PartNumber"&lt;/SPAN&gt;)

			&lt;SPAN&gt;' Place a Sketch Symbol&lt;/SPAN&gt;
			&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oSketchSymbol&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;SketchedSymbol&lt;/SPAN&gt; = &lt;SPAN&gt;oSheet&lt;/SPAN&gt;.&lt;SPAN&gt;SketchedSymbols&lt;/SPAN&gt;.&lt;SPAN&gt;Add&lt;/SPAN&gt;(&lt;SPAN&gt;oSketchSymbolDef&lt;/SPAN&gt;, &lt;SPAN&gt;oPositionPoint&lt;/SPAN&gt;, 0, 1)
			&lt;SPAN&gt;oSketchSymbol&lt;/SPAN&gt;.&lt;SPAN&gt;Static&lt;/SPAN&gt; = &lt;SPAN&gt;True&lt;/SPAN&gt;
			&lt;SPAN&gt;oSketchSymbol&lt;/SPAN&gt;.&lt;SPAN&gt;Leader&lt;/SPAN&gt;.&lt;SPAN&gt;AddLeader&lt;/SPAN&gt;(&lt;SPAN&gt;oLeaderPoints&lt;/SPAN&gt;)
			&lt;SPAN&gt;oSketchSymbol&lt;/SPAN&gt;.&lt;SPAN&gt;LeaderVisible&lt;/SPAN&gt; = &lt;SPAN&gt;False&lt;/SPAN&gt;
			&lt;SPAN&gt;oSketchSymbol&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt; = &lt;SPAN&gt;oOcc&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt;
		&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;

&lt;SPAN&gt;Next&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="theobot_0-1637057130748.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/990071i962CAFAC93803A2D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="theobot_0-1637057130748.png" alt="theobot_0-1637057130748.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With a large assembly it can be a mess adding all notes in one view, using the occurences can result in multiple symbols. So you might want to skip multiple instances.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="theobot_1-1637057278837.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/990074i5D2DEC090266212A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="theobot_1-1637057278837.png" alt="theobot_1-1637057278837.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Nov 2021 10:10:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/annotate-component-part-numbers-without-leaders/m-p/10760304#M43551</guid>
      <dc:creator>theo.bot</dc:creator>
      <dc:date>2021-11-16T10:10:25Z</dc:date>
    </item>
    <item>
      <title>Betreff: Annotate component part numbers without leaders</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/annotate-component-part-numbers-without-leaders/m-p/10760911#M43552</link>
      <description>&lt;P&gt;Thanks a lot! This set me on the right track and I got it working now. This line is basically what I was looking for:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;curve&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;DrawingCurve&lt;/SPAN&gt; = &lt;SPAN&gt;oView&lt;/SPAN&gt;.&lt;SPAN&gt;DrawingCurves&lt;/SPAN&gt;(&lt;SPAN&gt;oOcc&lt;/SPAN&gt;).&lt;SPAN&gt;Item&lt;/SPAN&gt;(1)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;In the cases where I want to use this there won't be a problem with getting messy. I'm going to use this to tag curtain wall mullions and transoms. Only in case the fields get very small this will be a problem, but then there's still the manual way to do this.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Nov 2021 14:32:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/annotate-component-part-numbers-without-leaders/m-p/10760911#M43552</guid>
      <dc:creator>mat_hijs</dc:creator>
      <dc:date>2021-11-16T14:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: Annotate component part numbers without leaders</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/annotate-component-part-numbers-without-leaders/m-p/10766221#M43553</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1104556"&gt;@Michael.Navara&lt;/a&gt;&amp;nbsp;You can absolutely remove a leader from a balloon. Place your normal balloon with a leader then right click and add a second vertex/leader, click the part again and attach the additional leader to the first leader line. Now you have a balloon with a leader that splits into two leaders, right click and delete leader and select the leader before it splits. Leader is gone, balloon is still attached to the drawing view/part and moves with the view/part. No need to create new styles or symbols.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 14:13:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/annotate-component-part-numbers-without-leaders/m-p/10766221#M43553</guid>
      <dc:creator>Jason.Rugg</dc:creator>
      <dc:date>2021-11-18T14:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: Annotate component part numbers without leaders</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/annotate-component-part-numbers-without-leaders/m-p/10766387#M43554</link>
      <description>&lt;P&gt;That actually sounds like a lot more work than creating a new style or a sketch symbol. And I might be wrong but that also sounds very hard or maybe even impossible to automate. I do appreciate the input though!&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 15:17:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/annotate-component-part-numbers-without-leaders/m-p/10766387#M43554</guid>
      <dc:creator>mat_hijs</dc:creator>
      <dc:date>2021-11-18T15:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: Annotate component part numbers without leaders</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/annotate-component-part-numbers-without-leaders/m-p/10766484#M43555</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8098075"&gt;@mat_hijs&lt;/a&gt;&amp;nbsp;I would agree that yes it is more work if you have to do it a lot, I was mainly just pointing out to&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1104556"&gt;@Michael.Navara&lt;/a&gt;&amp;nbsp;that you can actually delete a leader from a standard balloon. We have tried to automate this but haven't had much luck.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 15:52:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/annotate-component-part-numbers-without-leaders/m-p/10766484#M43555</guid>
      <dc:creator>Jason.Rugg</dc:creator>
      <dc:date>2021-11-18T15:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: Annotate component part numbers without leaders</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/annotate-component-part-numbers-without-leaders/m-p/10766491#M43556</link>
      <description>&lt;P&gt;This would definitely be the solution if you wanted to do this for just a couple balloons.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 15:53:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/annotate-component-part-numbers-without-leaders/m-p/10766491#M43556</guid>
      <dc:creator>mat_hijs</dc:creator>
      <dc:date>2021-11-18T15:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: Annotate component part numbers without leaders</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/annotate-component-part-numbers-without-leaders/m-p/11346494#M43557</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4152283"&gt;@theo.bot&lt;/a&gt;&amp;nbsp;I'm running into a problem now. The code works perfectly as long as the components you want to annotate are parts. But if you want to annotate subassemblies it'll just put the part number of one of the components since that's what's selected by the drawing curve. Do you have any way around this?&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2022 13:53:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/annotate-component-part-numbers-without-leaders/m-p/11346494#M43557</guid>
      <dc:creator>mat_hijs</dc:creator>
      <dc:date>2022-08-08T13:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: Annotate component part numbers without leaders</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/annotate-component-part-numbers-without-leaders/m-p/11347952#M43558</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8098075"&gt;@mat_hijs&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The challenge is the definition of the sketched symbol, it gets the partnumber of the attached geometry. So an alternative way would be an sketched symbol with prompted entry, that you fill with the part number of the occurrence, the sub assembly.&lt;/P&gt;&lt;P&gt;I created a new sketched symbol with a prompted entry to test it, and it works.&lt;BR /&gt;But now if you use prompted entries you need to add some coding to update the symbols for any property updates in the model.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the sample that i used ( make sure you have a sketched symbol with only one prompted entry, to test this):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oDoc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;DrawingDocument&lt;/SPAN&gt;
&lt;SPAN&gt;oDoc&lt;/SPAN&gt; = &lt;SPAN&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN&gt;Document&lt;/SPAN&gt;

&lt;SPAN&gt;' Set a reference to Active sheet&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;oSheet&lt;/SPAN&gt; = &lt;SPAN&gt;oDoc&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveSheet&lt;/SPAN&gt;

&lt;SPAN&gt;' Set a reference to first Drawing view&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oView&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;DrawingView&lt;/SPAN&gt;
&lt;SPAN&gt;oView&lt;/SPAN&gt; = &lt;SPAN&gt;oSheet&lt;/SPAN&gt;.&lt;SPAN&gt;DrawingViews&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(1)

&lt;SPAN&gt;' Set a reference to the TransientGeometry object.&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oTG&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;TransientGeometry&lt;/SPAN&gt;
&lt;SPAN&gt;oTG&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;TransientGeometry&lt;/SPAN&gt;

&lt;SPAN&gt;'create a object collection for leader points&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oLeaderPoints&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;ObjectCollection&lt;/SPAN&gt;
&lt;SPAN&gt;oLeaderPoints&lt;/SPAN&gt; = &lt;SPAN&gt;ThisApplication&lt;/SPAN&gt;.&lt;SPAN&gt;TransientObjects&lt;/SPAN&gt;.&lt;SPAN&gt;CreateObjectCollection&lt;/SPAN&gt;

&lt;SPAN&gt;' Set a reference to the main assembly referenced by the Drawing View&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oMainAsm&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;AssemblyDocument&lt;/SPAN&gt; = &lt;SPAN&gt;oView&lt;/SPAN&gt;.&lt;SPAN&gt;ReferencedDocumentDescriptor&lt;/SPAN&gt;.&lt;SPAN&gt;ReferencedDocument&lt;/SPAN&gt;
&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oMainAsmCompDef&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;AssemblyComponentDefinition&lt;/SPAN&gt; = &lt;SPAN&gt;oMainAsm&lt;/SPAN&gt;.&lt;SPAN&gt;ComponentDefinition&lt;/SPAN&gt;
&lt;SPAN&gt;Logger&lt;/SPAN&gt;.&lt;SPAN&gt;Info&lt;/SPAN&gt;(&lt;SPAN&gt;oMainAsm&lt;/SPAN&gt;.&lt;SPAN&gt;DisplayName&lt;/SPAN&gt;)
&lt;SPAN&gt;' Loop through all top level occurrences in the main assembly&lt;/SPAN&gt;
&lt;SPAN&gt;For&lt;/SPAN&gt; &lt;SPAN&gt;i&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Integer&lt;/SPAN&gt; = 1 &lt;SPAN&gt;To&lt;/SPAN&gt; &lt;SPAN&gt;oMainAsmCompDef&lt;/SPAN&gt;.&lt;SPAN&gt;Occurrences&lt;/SPAN&gt;.&lt;SPAN&gt;Count&lt;/SPAN&gt;
	
	&lt;SPAN&gt;' Set a reference to the Component Occurrence&lt;/SPAN&gt;
	&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oOcc&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;ComponentOccurrence&lt;/SPAN&gt; = &lt;SPAN&gt;oMainAsmCompDef&lt;/SPAN&gt;.&lt;SPAN&gt;Occurrences&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;i&lt;/SPAN&gt;)
&lt;SPAN&gt;Logger&lt;/SPAN&gt;.&lt;SPAN&gt;Info&lt;/SPAN&gt;(&lt;SPAN&gt;oOcc&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt;)
		&lt;SPAN&gt;' Set a reference to the centerpoint of the model&lt;/SPAN&gt;
		&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oOccCenterPoint&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Point&lt;/SPAN&gt; = &lt;SPAN&gt;oOcc&lt;/SPAN&gt;.&lt;SPAN&gt;MassProperties&lt;/SPAN&gt;.&lt;SPAN&gt;CenterOfMass&lt;/SPAN&gt;
		&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oOccPartNumber&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt; = &lt;SPAN&gt;oOcc&lt;/SPAN&gt;.&lt;SPAN&gt;ReferencedDocumentDescriptor&lt;/SPAN&gt;.&lt;SPAN&gt;ReferencedDocument&lt;/SPAN&gt;.&lt;SPAN&gt;PropertySets&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Design Tracking Properties"&lt;/SPAN&gt;).&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Part Number"&lt;/SPAN&gt;).&lt;SPAN&gt;Value&lt;/SPAN&gt;

		&lt;SPAN&gt;' Convert the centerpoint of the model to a point on the sheet&lt;/SPAN&gt;
		&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oPositionPoint&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;Point2d&lt;/SPAN&gt; = &lt;SPAN&gt;oView&lt;/SPAN&gt;.&lt;SPAN&gt;ModelToSheetSpace&lt;/SPAN&gt;(&lt;SPAN&gt;oOccCenterPoint&lt;/SPAN&gt;)

		&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;oView&lt;/SPAN&gt;.&lt;SPAN&gt;DrawingCurves&lt;/SPAN&gt;(&lt;SPAN&gt;oOcc&lt;/SPAN&gt;).&lt;SPAN&gt;Count&lt;/SPAN&gt; &amp;lt;&amp;gt; 0 &lt;SPAN&gt;Then&lt;/SPAN&gt;

			&lt;SPAN&gt;oLeaderPoints&lt;/SPAN&gt;.&lt;SPAN&gt;Clear&lt;/SPAN&gt;

			&lt;SPAN&gt;' The found curve is a drawing curve segment so we need to get the drawing curve.&lt;/SPAN&gt;
			&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;curve&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;DrawingCurve&lt;/SPAN&gt; = &lt;SPAN&gt;oView&lt;/SPAN&gt;.&lt;SPAN&gt;DrawingCurves&lt;/SPAN&gt;(&lt;SPAN&gt;oOcc&lt;/SPAN&gt;).&lt;SPAN&gt;Item&lt;/SPAN&gt;(1)
			
			&lt;SPAN&gt;'Get the midpoint from the curve&lt;/SPAN&gt;
			&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oGI1&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;GeometryIntent&lt;/SPAN&gt;
			&lt;SPAN&gt;oGI1&lt;/SPAN&gt; = &lt;SPAN&gt;oDoc&lt;/SPAN&gt;.&lt;SPAN&gt;ActiveSheet&lt;/SPAN&gt;.&lt;SPAN&gt;CreateGeometryIntent&lt;/SPAN&gt;(&lt;SPAN&gt;curve&lt;/SPAN&gt;, &lt;SPAN&gt;kCenterPointIntent&lt;/SPAN&gt;)

			&lt;SPAN&gt;oLeaderPoints&lt;/SPAN&gt;.&lt;SPAN&gt;Add&lt;/SPAN&gt;(&lt;SPAN&gt;oPositionPoint&lt;/SPAN&gt;)
			&lt;SPAN&gt;oLeaderPoints&lt;/SPAN&gt;.&lt;SPAN&gt;Add&lt;/SPAN&gt;(&lt;SPAN&gt;oGI1&lt;/SPAN&gt;)

			&lt;SPAN&gt;' Set a reference to the Sketch Symbol Definition&lt;/SPAN&gt;
			&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oSketchSymbolDef&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;SketchedSymbolDefinition&lt;/SPAN&gt; = &lt;SPAN&gt;oDoc&lt;/SPAN&gt;.&lt;SPAN&gt;SketchedSymbolDefinitions&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"PartNumberPrompt"&lt;/SPAN&gt;)
			&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oPromptStrings&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;String&lt;/SPAN&gt;() = {&lt;SPAN&gt;oOccPartNumber&lt;/SPAN&gt;}

			&lt;SPAN&gt;' Place a Sketch Symbol&lt;/SPAN&gt;
			&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;oSketchSymbol&lt;/SPAN&gt; &lt;SPAN&gt;As&lt;/SPAN&gt; &lt;SPAN&gt;SketchedSymbol&lt;/SPAN&gt; = &lt;SPAN&gt;oSheet&lt;/SPAN&gt;.&lt;SPAN&gt;SketchedSymbols&lt;/SPAN&gt;.&lt;SPAN&gt;Add&lt;/SPAN&gt;(&lt;SPAN&gt;oSketchSymbolDef&lt;/SPAN&gt;, &lt;SPAN&gt;oPositionPoint&lt;/SPAN&gt;, 0, 1,&lt;SPAN&gt;oPromptStrings&lt;/SPAN&gt;)
			&lt;SPAN&gt;oSketchSymbol&lt;/SPAN&gt;.&lt;SPAN&gt;Static&lt;/SPAN&gt; = &lt;SPAN&gt;True&lt;/SPAN&gt;
			&lt;SPAN&gt;oSketchSymbol&lt;/SPAN&gt;.&lt;SPAN&gt;Leader&lt;/SPAN&gt;.&lt;SPAN&gt;AddLeader&lt;/SPAN&gt;(&lt;SPAN&gt;oLeaderPoints&lt;/SPAN&gt;)
			&lt;SPAN&gt;oSketchSymbol&lt;/SPAN&gt;.&lt;SPAN&gt;LeaderVisible&lt;/SPAN&gt; = &lt;SPAN&gt;False&lt;/SPAN&gt;
			&lt;SPAN&gt;oSketchSymbol&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt; = &lt;SPAN&gt;oOcc&lt;/SPAN&gt;.&lt;SPAN&gt;Name&lt;/SPAN&gt;
		
		&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;

&lt;SPAN&gt;Next&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2022 06:10:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/annotate-component-part-numbers-without-leaders/m-p/11347952#M43558</guid>
      <dc:creator>theo.bot</dc:creator>
      <dc:date>2022-08-09T06:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: Annotate component part numbers without leaders</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/annotate-component-part-numbers-without-leaders/m-p/11355370#M43559</link>
      <description>&lt;P&gt;So if I understand correctly, this will be able to annotate everything correctly at first. But once everything is placed there is no link anymore? I don't really see a way yet to update the tags after they have been placed. Or more specific, updating the tags won't be a problem, but how will it know where it should get its information from when there is no link at all anymore?&lt;/P&gt;&lt;P&gt;I'm beginning to think that I might have to go back to either manually placing tags probably with AutoCAD blocks or to annotating everything in Revit.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2022 07:49:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/annotate-component-part-numbers-without-leaders/m-p/11355370#M43559</guid>
      <dc:creator>mat_hijs</dc:creator>
      <dc:date>2022-08-12T07:49:47Z</dc:date>
    </item>
  </channel>
</rss>

