<?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: vba help!! in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/vba-help/m-p/4367686#M128940</link>
    <description>&lt;P&gt;this is in red:&lt;/P&gt;&lt;P&gt;&amp;nbsp;prtdoc.SelectSet.Select prtdoc.ComponentDefinition.Sketches(i).SketchBlocks(j)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;am i correct to say that the code is predefining the blocks name as whatever (eg. steel)??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what i would like to do is select the block from the browser and not hardcode it .is it doable?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks..&lt;img id="smileyindifferent" class="emoticon emoticon-smileyindifferent" src="https://forums.autodesk.com/i/smilies/16x16_smiley-indifferent.png" alt="Smiley Indifferent" title="Smiley Indifferent" /&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Aug 2013 12:33:54 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-08-15T12:33:54Z</dc:date>
    <item>
      <title>vba help!!</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/vba-help/m-p/4366120#M128938</link>
      <description>&lt;P&gt;hi..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what is the code in selecting a sketch block from the browser in vba?&lt;/P&gt;&lt;P&gt;i only need to get the name of the block selected..&lt;/P&gt;&lt;P&gt;&lt;IMG align="center" src="https://forums.autodesk.com/t5/image/serverpage/image-id/58263i2087A2C3152880B6/image-size/original?v=mpbl-1&amp;amp;px=-1" title="solid2.jpg" alt="solid2.jpg" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2013 12:52:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/vba-help/m-p/4366120#M128938</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-14T12:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: vba help!!</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/vba-help/m-p/4367076#M128939</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; Enjoy mate.. Here is the code...&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; Give Some Kudos and accept as Solution&amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://forums.autodesk.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Sub SketchSel()
Dim prtdoc As PartDocument
Set prtdoc = ThisApplication.ActiveDocument
Dim prtdef As PartComponentDefinition
Set prtdef = prtdoc.ComponentDefinition

Dim sk As PlanarSketches
Set sk = prtdef.Sketches
Dim osk As PlanarSketch
For i = 1 To prtdef.Sketches.count
   Set osk = prtdef.Sketches(i)
    For j = 1 To osk.SketchBlocks.count
        If InStr(osk.SketchBlocks(j).Name, "Steel") Then
            prtdoc.SelectSet.Select prtdoc.ComponentDefinition.Sketches(i).SketchBlocks(j)
        End If
    Next
Next
End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2013 02:54:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/vba-help/m-p/4367076#M128939</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-15T02:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: vba help!!</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/vba-help/m-p/4367686#M128940</link>
      <description>&lt;P&gt;this is in red:&lt;/P&gt;&lt;P&gt;&amp;nbsp;prtdoc.SelectSet.Select prtdoc.ComponentDefinition.Sketches(i).SketchBlocks(j)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;am i correct to say that the code is predefining the blocks name as whatever (eg. steel)??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what i would like to do is select the block from the browser and not hardcode it .is it doable?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks..&lt;img id="smileyindifferent" class="emoticon emoticon-smileyindifferent" src="https://forums.autodesk.com/i/smilies/16x16_smiley-indifferent.png" alt="Smiley Indifferent" title="Smiley Indifferent" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2013 12:33:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/vba-help/m-p/4367686#M128940</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-15T12:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: vba help!!</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/vba-help/m-p/4368515#M128941</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Check my answers in &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;RED&lt;/STRONG&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;prtdoc.SelectSet.Select prtdoc.ComponentDefinition.Sketches(i).SketchBlock&lt;/SPAN&gt;&lt;SPAN&gt;s(j)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Make sure you got a part document as opend file in Inventor.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;am i correct to say that the code is predefining the blocks name as whatever (eg. steel)??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Yes.. &amp;nbsp;the code is looking for blocks with name(string) contains "Steel".&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;what i would like to do is select the block from the browser and not hardcode it .is it doable?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;You need to have a find or search function where you can enter name of block to be selected and code will highlight that block&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2013 23:15:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/vba-help/m-p/4368515#M128941</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-15T23:15:10Z</dc:date>
    </item>
  </channel>
</rss>

