<?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: Use AutoCAD Block for Balloon Style in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/use-autocad-block-for-balloon-style/m-p/7092426#M100893</link>
    <description>&lt;P&gt;Hi Terri,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately, through balloon style is not possible to place part number below slot shape.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It can be achieved by a small automation from VBA code. Before running the code, 2 prerequisites are required.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Slot shape defined&amp;nbsp;in a sketched symbol and called&amp;nbsp;it as "&lt;STRONG&gt;SlotSymbol&lt;/STRONG&gt;" as shown below.&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="SlotSymbol.jpg" style="width: 314px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/357512i6E17AFE8DECF83C2/image-size/large?v=v2&amp;amp;px=999" role="button" title="SlotSymbol.jpg" alt="SlotSymbol.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Define a balloon style and called it as "&lt;STRONG&gt;AutoCADStyle&lt;/STRONG&gt;". In this, balloon type is set to sketched symbol (&lt;STRONG&gt;SlotSymbol&lt;/STRONG&gt;) as shown below. To run the code, balloon name must be "&lt;STRONG&gt;AutoCADStyle&lt;/STRONG&gt;".&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="BalloonStyle.jpg" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/357513iF518FDC6663D4EAA/image-size/large?v=v2&amp;amp;px=999" role="button" title="BalloonStyle.jpg" alt="BalloonStyle.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After creating sketched symbol and balloon style, run the following sample VBA code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Sub main()

    Dim oDrawDoc As DrawingDocument
    Set oDrawDoc = ThisApplication.ActiveDocument

    Dim oBalloon As Balloon
    Set oBalloon = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingBalloonFilter, "Select a balloon")

    Dim oStyle As BalloonStyle
    Set oStyle = oDrawDoc.StylesManager.BalloonStyles.Item("AutoCADStyle")

    oStyle.Properties = "FormatID='{32853F0F-3444-11d1-9E93-0060B03C1CA6}'PropertyID='5'"

    oBalloon.Style = oStyle

    Dim s As String
    s = oBalloon.BalloonValueSets.Item(1).Value

    oStyle.Properties = "PartsListProperty='45572'"

    oBalloon.Style = oStyle

    Dim txtPt As Point2d
    Set txtPt = ThisApplication.TransientGeometry.CreatePoint2d(oBalloon.Position.X, oBalloon.Position.Y)
    txtPt.X = txtPt.X
    txtPt.Y = txtPt.Y - oBalloon.Style.BalloonDiameter

    Dim oText As Inventor.GeneralNote
    Set oText = oDrawDoc.Sheets.Item(1).DrawingNotes.GeneralNotes.AddFitted(txtPt, s)

    Set txtPt = ThisApplication.TransientGeometry.CreatePoint2d(oText.Position.X, oText.Position.Y)

    Dim wide As Double
    wide = oText.Width

    txtPt.X = txtPt.X - (wide / 2)

    oText.Position = txtPt
    
End Sub
&lt;/PRE&gt;
&lt;P&gt;On running the code, a prompt will appear to select a balloon. After successful balloon selection, a text will be created below slot shape. Text contains respective part number of the selected balloon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please feel free to contact if there is any doubt.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If solves your problem, click on "Accept as solution" or give a "Kudo".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
    <pubDate>Thu, 18 May 2017 10:50:48 GMT</pubDate>
    <dc:creator>chandra.shekar.g</dc:creator>
    <dc:date>2017-05-18T10:50:48Z</dc:date>
    <item>
      <title>Use AutoCAD Block for Balloon Style</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/use-autocad-block-for-balloon-style/m-p/7088343#M100892</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In Inventor Pro 20017, I need to make a drawing Balloon Style that looks exactly like the AutoCAD block&amp;nbsp;below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BalloonStyleEx.jpg" style="width: 295px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/356805i4FD6A0755A2D199D/image-dimensions/295x130?v=v2" width="295" height="130" role="button" title="BalloonStyleEx.jpg" alt="BalloonStyleEx.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created a sketch symbol and set the balloon style to use the symbol and this is what I get:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BalloonStyleEx-1.jpg" style="width: 203px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/356806i224D413501F43B64/image-size/large?v=v2&amp;amp;px=999" role="button" title="BalloonStyleEx-1.jpg" alt="BalloonStyleEx-1.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I get the slot shape only around ITEM# (XXX1) and the part iProp&amp;nbsp;(GAR2426) below the slot shape?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help,&lt;/P&gt;&lt;P&gt;Terri&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 00:34:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/use-autocad-block-for-balloon-style/m-p/7088343#M100892</guid>
      <dc:creator>thumel</dc:creator>
      <dc:date>2017-05-17T00:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: Use AutoCAD Block for Balloon Style</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/use-autocad-block-for-balloon-style/m-p/7092426#M100893</link>
      <description>&lt;P&gt;Hi Terri,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately, through balloon style is not possible to place part number below slot shape.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It can be achieved by a small automation from VBA code. Before running the code, 2 prerequisites are required.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Slot shape defined&amp;nbsp;in a sketched symbol and called&amp;nbsp;it as "&lt;STRONG&gt;SlotSymbol&lt;/STRONG&gt;" as shown below.&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="SlotSymbol.jpg" style="width: 314px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/357512i6E17AFE8DECF83C2/image-size/large?v=v2&amp;amp;px=999" role="button" title="SlotSymbol.jpg" alt="SlotSymbol.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Define a balloon style and called it as "&lt;STRONG&gt;AutoCADStyle&lt;/STRONG&gt;". In this, balloon type is set to sketched symbol (&lt;STRONG&gt;SlotSymbol&lt;/STRONG&gt;) as shown below. To run the code, balloon name must be "&lt;STRONG&gt;AutoCADStyle&lt;/STRONG&gt;".&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="BalloonStyle.jpg" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/357513iF518FDC6663D4EAA/image-size/large?v=v2&amp;amp;px=999" role="button" title="BalloonStyle.jpg" alt="BalloonStyle.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After creating sketched symbol and balloon style, run the following sample VBA code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Sub main()

    Dim oDrawDoc As DrawingDocument
    Set oDrawDoc = ThisApplication.ActiveDocument

    Dim oBalloon As Balloon
    Set oBalloon = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingBalloonFilter, "Select a balloon")

    Dim oStyle As BalloonStyle
    Set oStyle = oDrawDoc.StylesManager.BalloonStyles.Item("AutoCADStyle")

    oStyle.Properties = "FormatID='{32853F0F-3444-11d1-9E93-0060B03C1CA6}'PropertyID='5'"

    oBalloon.Style = oStyle

    Dim s As String
    s = oBalloon.BalloonValueSets.Item(1).Value

    oStyle.Properties = "PartsListProperty='45572'"

    oBalloon.Style = oStyle

    Dim txtPt As Point2d
    Set txtPt = ThisApplication.TransientGeometry.CreatePoint2d(oBalloon.Position.X, oBalloon.Position.Y)
    txtPt.X = txtPt.X
    txtPt.Y = txtPt.Y - oBalloon.Style.BalloonDiameter

    Dim oText As Inventor.GeneralNote
    Set oText = oDrawDoc.Sheets.Item(1).DrawingNotes.GeneralNotes.AddFitted(txtPt, s)

    Set txtPt = ThisApplication.TransientGeometry.CreatePoint2d(oText.Position.X, oText.Position.Y)

    Dim wide As Double
    wide = oText.Width

    txtPt.X = txtPt.X - (wide / 2)

    oText.Position = txtPt
    
End Sub
&lt;/PRE&gt;
&lt;P&gt;On running the code, a prompt will appear to select a balloon. After successful balloon selection, a text will be created below slot shape. Text contains respective part number of the selected balloon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please feel free to contact if there is any doubt.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If solves your problem, click on "Accept as solution" or give a "Kudo".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2017 10:50:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/use-autocad-block-for-balloon-style/m-p/7092426#M100893</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2017-05-18T10:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: Use AutoCAD Block for Balloon Style</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/use-autocad-block-for-balloon-style/m-p/7093581#M100894</link>
      <description>Thank-you for the response! I will try the running the VBA code as you suggested. However, I was able to make the Balloon look the way the AutoCAD block looks by leaving spaces for the attribute values then importing the block into Inventor as a symbol. See below:&lt;BR /&gt;[cid:image002.jpg@01D2CFD4.E3CC0220]&lt;BR /&gt;</description>
      <pubDate>Thu, 18 May 2017 17:47:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/use-autocad-block-for-balloon-style/m-p/7093581#M100894</guid>
      <dc:creator>thumel</dc:creator>
      <dc:date>2017-05-18T17:47:21Z</dc:date>
    </item>
  </channel>
</rss>

