<?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 Callout balloon referencing folder name in feature tree assembly in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/callout-balloon-referencing-folder-name-in-feature-tree-assembly/m-p/9760012#M116181</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know how to create a custom callout balloon which can reference the "name" of the folder within the assembly feature tree?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have inserted sub-assemblies within folders in the assembly and named them "Location 1", "Location 2".... ect". I want to callout these "locations" in a drawing but don't know how I can link folder names back to callout balloons.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using Inventor 2019. Your help would be greatly appreciated.&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;Alex&lt;/P&gt;</description>
    <pubDate>Mon, 21 Sep 2020 23:15:45 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-09-21T23:15:45Z</dc:date>
    <item>
      <title>Callout balloon referencing folder name in feature tree assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/callout-balloon-referencing-folder-name-in-feature-tree-assembly/m-p/9760012#M116181</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know how to create a custom callout balloon which can reference the "name" of the folder within the assembly feature tree?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have inserted sub-assemblies within folders in the assembly and named them "Location 1", "Location 2".... ect". I want to callout these "locations" in a drawing but don't know how I can link folder names back to callout balloons.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using Inventor 2019. Your help would be greatly appreciated.&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;Alex&lt;/P&gt;</description>
      <pubDate>Mon, 21 Sep 2020 23:15:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/callout-balloon-referencing-folder-name-in-feature-tree-assembly/m-p/9760012#M116181</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-09-21T23:15:45Z</dc:date>
    </item>
    <item>
      <title>Re: Callout balloon referencing folder name in feature tree assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/callout-balloon-referencing-folder-name-in-feature-tree-assembly/m-p/9761952#M116224</link>
      <description>&lt;P&gt;This is a somewhat odd request, but I'll give it a try.&lt;/P&gt;&lt;P&gt;Do you need to use Balloons for this, or would another form of annotation like a LeaderNote (Leader Text) work?&lt;/P&gt;&lt;P&gt;Here is some (untested) code that may work for you using Balloons.&lt;/P&gt;&lt;P&gt;It it set up have you select an existing balloon, that is already attached to a component you want to call-out this way.&lt;/P&gt;&lt;P&gt;It then attempts to get the parent view.&amp;nbsp; Get the assembly document within that view.&amp;nbsp; User the balloons BalloonValueSet that contains a reference to which DrawingBOMRow it is associated with.&amp;nbsp; Get the ComponentDefinition associated with that row.&amp;nbsp; Get the BrowserNode for that component.&amp;nbsp; Then search up through a couple of parent nodes, checking to see if they are a BrowserFolder, and if it finds one, it then tries to override the value of the balloon with the name of that folder.&lt;/P&gt;&lt;P&gt;Here's the (untested) code I've got so far.&amp;nbsp; See if this will work for you.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim oDDoc As DrawingDocument = ThisDrawing.Document
Dim oSheet As Inventor.Sheet = oDDoc.ActiveSheet
Dim oBalloon As Balloon = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingBalloonFilter,"Select a Balloon.")
Dim oView As DrawingView = oBalloon.ParentView
Dim oADoc As AssemblyDocument = oView.ReferencedDocumentDescriptor.ReferencedDocument
Dim oVBSet As BalloonValueSet
Dim oCD As ComponentDefinition
If oBalloon.Attached Then' or Try
	oVBSet = oBalloon.BalloonValueSets.Item(1)
	oCD = oVBSet.ReferencedRow.BOMRow.ComponentDefinitions.Item(1)
End If
'Get BrowserNode for this component, then use that to find what BrowserFolder it is within
Dim oPane As BrowserPane = oADoc.BrowserPanes.Item("PmDefault")
Dim oNode As BrowserNode = oPane.GetBrowserNodeFromObject(oCD)
Dim oBFolder As BrowserFolder
If oNode.Parent.Type = ObjectTypeEnum.kBrowserFolderObject Then
	oBFolder = oNode.Parent
ElseIf oNode.Parent.Parent.Type = ObjectTypeEnum.kBrowserFolderObject Then
	oBFolder = oNode.Parent.Parent
Else
	MsgBox("Couln't find the Browser Folder for the Item this Balloon is attached to.  Exiting.", vbOKOnly, " ")
	Exit Sub
End If
oBalloon.BalloonValueSets.Item(1).OverrideValue = oBFolder.Name
oBalloon.BalloonValueSets.Item(1).Static = True&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 22 Sep 2020 19:05:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/callout-balloon-referencing-folder-name-in-feature-tree-assembly/m-p/9761952#M116224</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2020-09-22T19:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: Callout balloon referencing folder name in feature tree assembly</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/callout-balloon-referencing-folder-name-in-feature-tree-assembly/m-p/9762428#M116227</link>
      <description>&lt;P&gt;Hi WCriHfield,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your attempt;&lt;/P&gt;&lt;P&gt;re your question: "&lt;SPAN&gt;Do you need to use Balloons for this, or would another form of annotation like a LeaderNote (Leader Text) work?"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I don't have to use balloons if you see a more reliable way of achieving what I am trying to do.&lt;/P&gt;&lt;P&gt;The desired end result [below] shows the location and&amp;nbsp; the components within those folders. However, this requires assemblies for each location and custom fields in the BOMs. Not very practical for documents with hundreds of locations.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture1.PNG" style="width: 736px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/822441i88AB3A22F05349EF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture1.PNG" alt="Capture1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I tried your rule and received the following errors;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture2.PNG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/822442i8F6D9C637CF23CB3/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture2.PNG" alt="Capture2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2020 00:21:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/callout-balloon-referencing-folder-name-in-feature-tree-assembly/m-p/9762428#M116227</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-09-23T00:21:05Z</dc:date>
    </item>
  </channel>
</rss>

