<?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: Question to Brian in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/question-to-brian/m-p/1674724#M158978</link>
    <description>This works out, though I was hoping to get wildcards to work with the feature.item.  Ultimately I would like to interrogate all of a part's feature's within a drawing, create new layers based on the feature name, and then move those features to the appropriate layers.  I'm new to VBA and hope I'm not being to ambitious.  Thank you very much for your help, it is greatly appreciated.</description>
    <pubDate>Wed, 14 Mar 2007 11:48:01 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2007-03-14T11:48:01Z</dc:date>
    <item>
      <title>Question to Brian</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/question-to-brian/m-p/1674718#M158972</link>
      <description>Is it possible to do the following thing&lt;BR /&gt;
by code ?&lt;BR /&gt;
Select a part in the Browser pane of an Drawing,&lt;BR /&gt;
then mimic the select command, after that&lt;BR /&gt;
start the command all edges and&lt;BR /&gt;
move all the edges of the selected part to a new layer.&lt;BR /&gt;
&lt;BR /&gt;
Kindest regards,&lt;BR /&gt;
&lt;BR /&gt;
JesG</description>
      <pubDate>Wed, 14 Jun 2006 13:42:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/question-to-brian/m-p/1674718#M158972</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-06-14T13:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: Question to Brian</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/question-to-brian/m-p/1674719#M158973</link>
      <description>I didn't do any error checking and only tested it on one case but this will &lt;BR /&gt;
at least provide a starting point.  I tried to add enough comments that &lt;BR /&gt;
hopefully you can make some sense out of it.&lt;BR /&gt;
&lt;BR /&gt;
Public Sub ChangeLayerOfPart()&lt;BR /&gt;
    Dim oDoc As DrawingDocument&lt;BR /&gt;
    Set oDoc = ThisApplication.ActiveDocument&lt;BR /&gt;
&lt;BR /&gt;
    ' Call the function to find a specific node.  The second argument of &lt;BR /&gt;
this function&lt;BR /&gt;
    ' is a string that would be within the full browser path of the node you &lt;BR /&gt;
want to&lt;BR /&gt;
    ' find.  For example, if looking for an occurrence named Crank:1 that's &lt;BR /&gt;
contained&lt;BR /&gt;
    ' within the assembly 4Bar.iam, then you can use the search path &lt;BR /&gt;
"4Bar.iam:Crank:1".&lt;BR /&gt;
    ' The colon is used to seperate the individual components of the path. &lt;BR /&gt;
(In this case&lt;BR /&gt;
    ' one is also used in the name of the occurrence.)&lt;BR /&gt;
    Dim oNode As BrowserNode&lt;BR /&gt;
    Set oNode = GetBrowserNodeByName(oDoc.BrowserPanes.ActivePane.TopNode, &lt;BR /&gt;
"4Bar.iam:Crank:1")&lt;BR /&gt;
&lt;BR /&gt;
    ' Select the object represented by the node.&lt;BR /&gt;
    oNode.DoSelect&lt;BR /&gt;
&lt;BR /&gt;
    ' Assuming the node represented a part within an assembly in a drawing &lt;BR /&gt;
view, this&lt;BR /&gt;
    ' then executes the "Select as Edges" command.&lt;BR /&gt;
    Dim oControlDef As ControlDefinition&lt;BR /&gt;
    Set oControlDef = &lt;BR /&gt;
ThisApplication.CommandManager.ControlDefinitions.Item("SelectAsEdgesCtxCmd")&lt;BR /&gt;
    oControlDef.Execute&lt;BR /&gt;
&lt;BR /&gt;
    ' Get the layer object that we want to use.&lt;BR /&gt;
    Dim oLayer As Layer&lt;BR /&gt;
    Set oLayer = oDoc.StylesManager.Layers.Item("Hidden")&lt;BR /&gt;
&lt;BR /&gt;
    ' Iterate through the curves and change their layer.&lt;BR /&gt;
    Dim oDrawCurveSegment As DrawingCurveSegment&lt;BR /&gt;
    For Each oDrawCurveSegment In oDoc.SelectSet&lt;BR /&gt;
        oDrawCurveSegment.Layer = oLayer&lt;BR /&gt;
    Next&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Private Function GetBrowserNodeByName(ByVal TopNode As BrowserNode, ByVal &lt;BR /&gt;
FullPathSearchString As String) As BrowserNode&lt;BR /&gt;
    Set GetBrowserNodeByName = Nothing&lt;BR /&gt;
&lt;BR /&gt;
    ' Go through the child nodes of the node passed in.&lt;BR /&gt;
    Dim oSubNode As BrowserNode&lt;BR /&gt;
    For Each oSubNode In TopNode.BrowserNodes&lt;BR /&gt;
        ' Check to see if this node is visible.  Skip it if it is.&lt;BR /&gt;
        If oSubNode.Visible Then&lt;BR /&gt;
            ' Check to see if the supplied search search is in the full path &lt;BR /&gt;
of the current node.&lt;BR /&gt;
            If InStr(oSubNode.FullPath, FullPathSearchString) Then&lt;BR /&gt;
                ' Set the return value and exit.&lt;BR /&gt;
                Set GetBrowserNodeByName = oSubNode&lt;BR /&gt;
                Exit Function&lt;BR /&gt;
            Else&lt;BR /&gt;
                ' Check to see if this node has any children.&lt;BR /&gt;
                If oSubNode.BrowserNodes.Count &amp;gt; 0 Then&lt;BR /&gt;
                    ' Recursively call this function to traverse the tree.&lt;BR /&gt;
                    Set GetBrowserNodeByName = &lt;BR /&gt;
GetBrowserNodeByName(oSubNode, FullPathSearchString)&lt;BR /&gt;
                End If&lt;BR /&gt;
            End If&lt;BR /&gt;
        End If&lt;BR /&gt;
    Next&lt;BR /&gt;
End Function&lt;BR /&gt;
-- &lt;BR /&gt;
Brian Ekins&lt;BR /&gt;
Autodesk Inventor API&lt;BR /&gt;
&lt;BR /&gt;
&lt;JESG&gt; wrote in message news:5205735@discussion.autodesk.com...&lt;BR /&gt;
Is it possible to do the following thing&lt;BR /&gt;
by code ?&lt;BR /&gt;
Select a part in the Browser pane of an Drawing,&lt;BR /&gt;
then mimic the select command, after that&lt;BR /&gt;
start the command all edges and&lt;BR /&gt;
move all the edges of the selected part to a new layer.&lt;BR /&gt;
&lt;BR /&gt;
Kindest regards,&lt;BR /&gt;
&lt;BR /&gt;
JesG&lt;/JESG&gt;</description>
      <pubDate>Wed, 14 Jun 2006 21:52:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/question-to-brian/m-p/1674719#M158973</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-06-14T21:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: Question to Brian</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/question-to-brian/m-p/1674720#M158974</link>
      <description>Dear Brian,&lt;BR /&gt;
&lt;BR /&gt;
thank you for the quick response.&lt;BR /&gt;
is it possible to get the Model object from the Node?&lt;BR /&gt;
I know that there is the method in the drawing document&lt;BR /&gt;
ProcessViewSelection but i did not know how to cast the Node object&lt;BR /&gt;
to the Generic object&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance&lt;BR /&gt;
&lt;BR /&gt;
JesG</description>
      <pubDate>Thu, 15 Jun 2006 06:52:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/question-to-brian/m-p/1674720#M158974</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-06-15T06:52:41Z</dc:date>
    </item>
    <item>
      <title>Re: Question to Brian</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/question-to-brian/m-p/1674721#M158975</link>
      <description>I thought about this some more and realized the browser is not a very good &lt;BR /&gt;
approach for this.  Instead you can access the assembly directly and find &lt;BR /&gt;
the part(s) of interest in the assembly and then get their corresponding &lt;BR /&gt;
edges in the drawing.  Here's a new version of the program that does this. &lt;BR /&gt;
In this case I'm using the name of the occurrence to find the match but you &lt;BR /&gt;
could choose to use any method to find the part you want to change the layer &lt;BR /&gt;
for.&lt;BR /&gt;
&lt;BR /&gt;
Public Sub ChangePartLayer()&lt;BR /&gt;
    Dim oDrawDoc As DrawingDocument&lt;BR /&gt;
    Set oDrawDoc = ThisApplication.ActiveDocument&lt;BR /&gt;
&lt;BR /&gt;
    On Error Resume Next&lt;BR /&gt;
    Dim oView As DrawingView&lt;BR /&gt;
    Set oView = oDrawDoc.SelectSet.Item(1)&lt;BR /&gt;
    If Err Then&lt;BR /&gt;
        MsgBox "A drawing view must be selected."&lt;BR /&gt;
        Exit Sub&lt;BR /&gt;
    End If&lt;BR /&gt;
&lt;BR /&gt;
    ' Get the assembly displayed in the view.&lt;BR /&gt;
    Dim oAsmDoc As AssemblyDocument&lt;BR /&gt;
    Set oAsmDoc = oView.ReferencedDocumentDescriptor.ReferencedDocument&lt;BR /&gt;
    If Err Then&lt;BR /&gt;
        MsgBox "Unable to get the referenced assembly from the selected &lt;BR /&gt;
view."&lt;BR /&gt;
        Exit Sub&lt;BR /&gt;
    End If&lt;BR /&gt;
    On Error GoTo 0&lt;BR /&gt;
&lt;BR /&gt;
    ' Find the occurrence(s) of interest in the assembly.  The name &lt;BR /&gt;
specified can&lt;BR /&gt;
    ' use wild cards and will match the occurrence name.  More than once &lt;BR /&gt;
match&lt;BR /&gt;
    ' can occur and all matches will have the layer changed.&lt;BR /&gt;
    Dim oOccs As ObjectCollection&lt;BR /&gt;
    Call FindOccurrencesByName(oAsmDoc.ComponentDefinition.Occurrences, &lt;BR /&gt;
"*Crank*", oOccs)&lt;BR /&gt;
&lt;BR /&gt;
    ' Get the layer object that we want to use.&lt;BR /&gt;
    Dim oLayer As Layer&lt;BR /&gt;
    Set oLayer = oDrawDoc.StylesManager.Layers.Item("Hidden")&lt;BR /&gt;
&lt;BR /&gt;
    ' Get the curves in the view associated with the found occurrences.&lt;BR /&gt;
    Dim oOcc As ComponentOccurrence&lt;BR /&gt;
    For Each oOcc In oOccs&lt;BR /&gt;
        Dim oDrawCurves As DrawingCurvesEnumerator&lt;BR /&gt;
        Set oDrawCurves = oView.DrawingCurves(oOcc)&lt;BR /&gt;
&lt;BR /&gt;
        ' Iterate through the drawing curves associated with this part.&lt;BR /&gt;
        Dim oDrawCurve As DrawingCurve&lt;BR /&gt;
        For Each oDrawCurve In oDrawCurves&lt;BR /&gt;
            ' Iterate through the segments in each curve and change their &lt;BR /&gt;
layer.&lt;BR /&gt;
            Dim oDrawCurveSegment As DrawingCurveSegment&lt;BR /&gt;
            For Each oDrawCurveSegment In oDrawCurve.Segments&lt;BR /&gt;
                oDrawCurveSegment.Layer = oLayer&lt;BR /&gt;
            Next&lt;BR /&gt;
        Next&lt;BR /&gt;
    Next&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Private Sub FindOccurrencesByName(ByVal Occurrences As ComponentOccurrences, &lt;BR /&gt;
ByVal SearchName As String, ByRef FoundOccurrences As ObjectCollection)&lt;BR /&gt;
    ' Create the object collection, but only on the first entry into this &lt;BR /&gt;
function.&lt;BR /&gt;
    Static Initialized As Boolean&lt;BR /&gt;
    If Not Initialized Then&lt;BR /&gt;
        Set FoundOccurrences = &lt;BR /&gt;
ThisApplication.TransientObjects.CreateObjectCollection&lt;BR /&gt;
        Initialized = True&lt;BR /&gt;
    End If&lt;BR /&gt;
&lt;BR /&gt;
    Dim oOcc As ComponentOccurrence&lt;BR /&gt;
    For Each oOcc In Occurrences&lt;BR /&gt;
        ' Check to see if this occurrence has a matching name.&lt;BR /&gt;
        If oOcc.name Like SearchName Then&lt;BR /&gt;
            ' Add this occurrence to the collection.&lt;BR /&gt;
            FoundOccurrences.Add oOcc&lt;BR /&gt;
        End If&lt;BR /&gt;
&lt;BR /&gt;
        ' Resursively call this function to traverse the entire assembly &lt;BR /&gt;
tree.&lt;BR /&gt;
        Call FindOccurrencesByName(oOcc.SubOccurrences, SearchName, &lt;BR /&gt;
FoundOccurrences)&lt;BR /&gt;
    Next&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Brian Ekins&lt;BR /&gt;
Autodesk Inventor API&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;JESG&gt; wrote in message news:5207009@discussion.autodesk.com...&lt;BR /&gt;
Dear Brian,&lt;BR /&gt;
&lt;BR /&gt;
thank you for the quick response.&lt;BR /&gt;
is it possible to get the Model object from the Node?&lt;BR /&gt;
I know that there is the method in the drawing document&lt;BR /&gt;
ProcessViewSelection but i did not know how to cast the Node object&lt;BR /&gt;
to the Generic object&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance&lt;BR /&gt;
&lt;BR /&gt;
JesG&lt;/JESG&gt;</description>
      <pubDate>Thu, 15 Jun 2006 17:10:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/question-to-brian/m-p/1674721#M158975</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-06-15T17:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: Question to Brian</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/question-to-brian/m-p/1674722#M158976</link>
      <description>Is there anyway to modify this code to select features within a part?  I am trying to assign features within a part drawing to specific layers.  I am using Inventor 11.

Message was edited by: mcleamic</description>
      <pubDate>Fri, 09 Mar 2007 21:56:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/question-to-brian/m-p/1674722#M158976</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-09T21:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: Question to Brian</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/question-to-brian/m-p/1674723#M158977</link>
      <description>It turns out that it's fairly easy to support this for a feature.  This is &lt;BR /&gt;
because the DrawingCurves method also allows a feature as input.  You just &lt;BR /&gt;
have to be careful that you provide the feature in the correct way.  In this &lt;BR /&gt;
case since the drawing view is of an assembly, the provided feature needs to &lt;BR /&gt;
be in the context of the assembly, which means we need to supply a proxy for &lt;BR /&gt;
the feature.  The code below does this.&lt;BR /&gt;
&lt;BR /&gt;
Public Sub ChangePartLayer()&lt;BR /&gt;
    Dim oDrawDoc As DrawingDocument&lt;BR /&gt;
    Set oDrawDoc = ThisApplication.ActiveDocument&lt;BR /&gt;
&lt;BR /&gt;
    On Error Resume Next&lt;BR /&gt;
    Dim oView As DrawingView&lt;BR /&gt;
    Set oView = oDrawDoc.SelectSet.Item(1)&lt;BR /&gt;
    If Err Then&lt;BR /&gt;
        MsgBox "A drawing view must be selected."&lt;BR /&gt;
        Exit Sub&lt;BR /&gt;
    End If&lt;BR /&gt;
&lt;BR /&gt;
    ' Get the assembly displayed in the view.&lt;BR /&gt;
    Dim oAsmDoc As AssemblyDocument&lt;BR /&gt;
    Set oAsmDoc = oView.ReferencedDocumentDescriptor.ReferencedDocument&lt;BR /&gt;
    If Err Then&lt;BR /&gt;
        MsgBox "Unable to get the referenced assembly from the selected &lt;BR /&gt;
view."&lt;BR /&gt;
        Exit Sub&lt;BR /&gt;
    End If&lt;BR /&gt;
    On Error GoTo 0&lt;BR /&gt;
&lt;BR /&gt;
    ' Find the occurrence(s) of interest in the assembly.  The name &lt;BR /&gt;
specified can&lt;BR /&gt;
    ' use wild cards and will match the occurrence name.  More than once &lt;BR /&gt;
match&lt;BR /&gt;
    ' can occur and all matches will have the layer changed.&lt;BR /&gt;
    Dim oOccs As ObjectCollection&lt;BR /&gt;
    Call FindOccurrencesByName(oAsmDoc.ComponentDefinition.Occurrences, &lt;BR /&gt;
"*Base*", oOccs)&lt;BR /&gt;
&lt;BR /&gt;
    ' Get the layer object that we want to use.&lt;BR /&gt;
    Dim oLayer As Layer&lt;BR /&gt;
    Set oLayer = oDrawDoc.StylesManager.Layers.Item("Hidden (ANSI)")&lt;BR /&gt;
&lt;BR /&gt;
    ' Get the curves in the view associated with the found occurrences.&lt;BR /&gt;
    Dim oOcc As ComponentOccurrence&lt;BR /&gt;
    For Each oOcc In oOccs&lt;BR /&gt;
        ' Get the feature within the occurrence to change the layer for.&lt;BR /&gt;
        ' This gets the feature named "Extrusion2".&lt;BR /&gt;
        Dim oPartDef As PartComponentDefinition&lt;BR /&gt;
        Set oPartDef = oOcc.Definition&lt;BR /&gt;
        Dim oNativeFeature As PartFeature&lt;BR /&gt;
        Set oNativeFeature = oPartDef.Features.Item("Extrusion2")&lt;BR /&gt;
&lt;BR /&gt;
        ' Create a proxy for the feature.&lt;BR /&gt;
        Call oOcc.CreateGeometryProxy(oNativeFeature, oNativeFeature)&lt;BR /&gt;
&lt;BR /&gt;
        Dim oDrawCurves As DrawingCurvesEnumerator&lt;BR /&gt;
        Set oDrawCurves = oView.DrawingCurves(oNativeFeature)&lt;BR /&gt;
&lt;BR /&gt;
        ' Iterate through the drawing curves associated with this part.&lt;BR /&gt;
        Dim oDrawCurve As DrawingCurve&lt;BR /&gt;
        For Each oDrawCurve In oDrawCurves&lt;BR /&gt;
            ' Iterate through the segments in each curve and change their &lt;BR /&gt;
layer.&lt;BR /&gt;
            Dim oDrawCurveSegment As DrawingCurveSegment&lt;BR /&gt;
            For Each oDrawCurveSegment In oDrawCurve.Segments&lt;BR /&gt;
                oDrawCurveSegment.Layer = oLayer&lt;BR /&gt;
            Next&lt;BR /&gt;
        Next&lt;BR /&gt;
    Next&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Private Sub FindOccurrencesByName(ByVal Occurrences As ComponentOccurrences, &lt;BR /&gt;
ByVal SearchName As String, ByRef FoundOccurrences As ObjectCollection)&lt;BR /&gt;
    ' Create the object collection, but only on the first entry into this &lt;BR /&gt;
function.&lt;BR /&gt;
    Static Initialized As Boolean&lt;BR /&gt;
    If Not Initialized Then&lt;BR /&gt;
        Set FoundOccurrences = &lt;BR /&gt;
ThisApplication.TransientObjects.CreateObjectCollection&lt;BR /&gt;
        Initialized = True&lt;BR /&gt;
    End If&lt;BR /&gt;
&lt;BR /&gt;
    Dim oOcc As ComponentOccurrence&lt;BR /&gt;
    For Each oOcc In Occurrences&lt;BR /&gt;
        ' Check to see if this occurrence has a matching name.&lt;BR /&gt;
        If oOcc.Name Like SearchName Then&lt;BR /&gt;
            ' Add this occurrence to the collection.&lt;BR /&gt;
            FoundOccurrences.Add oOcc&lt;BR /&gt;
        End If&lt;BR /&gt;
&lt;BR /&gt;
        ' Resursively call this function to traverse the entire assembly &lt;BR /&gt;
tree.&lt;BR /&gt;
        Call FindOccurrencesByName(oOcc.SubOccurrences, SearchName, &lt;BR /&gt;
FoundOccurrences)&lt;BR /&gt;
    Next&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Brian Ekins&lt;BR /&gt;
Autodesk Inventor API</description>
      <pubDate>Tue, 13 Mar 2007 21:16:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/question-to-brian/m-p/1674723#M158977</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-13T21:16:52Z</dc:date>
    </item>
    <item>
      <title>Re: Question to Brian</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/question-to-brian/m-p/1674724#M158978</link>
      <description>This works out, though I was hoping to get wildcards to work with the feature.item.  Ultimately I would like to interrogate all of a part's feature's within a drawing, create new layers based on the feature name, and then move those features to the appropriate layers.  I'm new to VBA and hope I'm not being to ambitious.  Thank you very much for your help, it is greatly appreciated.</description>
      <pubDate>Wed, 14 Mar 2007 11:48:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/question-to-brian/m-p/1674724#M158978</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-14T11:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: Question to Brian</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/question-to-brian/m-p/1674725#M158979</link>
      <description>It would be possible to support a wild card look-up for a feature.  In the &lt;BR /&gt;
example I sent you it's using the Item method to get a specific feature. &lt;BR /&gt;
This doesn't support wild card matches but expects an exact match.  Instead &lt;BR /&gt;
you'll need to iterate through the entire collection and match the names &lt;BR /&gt;
yourself.  In this case you can do any type of matching that you want, &lt;BR /&gt;
including wild cards.  To do this you can use the Like operator.  This is &lt;BR /&gt;
demonstrated below.&lt;BR /&gt;
&lt;BR /&gt;
    Dim strMatchString As String&lt;BR /&gt;
    strMatchString = "Extrude*"&lt;BR /&gt;
&lt;BR /&gt;
    Dim i As Integer&lt;BR /&gt;
    For i = 1 To oPartFeatures.Count&lt;BR /&gt;
        If oPartFeatures.Item(i) Like strMatchString Then&lt;BR /&gt;
            Debug.Print "Match"&lt;BR /&gt;
        Else&lt;BR /&gt;
            Debug.Print "No match"&lt;BR /&gt;
        End If&lt;BR /&gt;
    Next&lt;BR /&gt;
-- &lt;BR /&gt;
Brian Ekins&lt;BR /&gt;
Autodesk Inventor API&lt;BR /&gt;
&lt;BR /&gt;
&lt;MCLEAMIC&gt; wrote in message news:5517765@discussion.autodesk.com...&lt;BR /&gt;
This works out, though I was hoping to get wildcards to work with the &lt;BR /&gt;
feature.item.  Ultimately I would like to interrogate all of a part's &lt;BR /&gt;
feature's within a drawing, create new layers based on the feature name, and &lt;BR /&gt;
then move those features to the appropriate layers.  I'm new to VBA and hope &lt;BR /&gt;
I'm not being to ambitious.  Thank you very much for your help, it is &lt;BR /&gt;
greatly appreciated.&lt;/MCLEAMIC&gt;</description>
      <pubDate>Wed, 14 Mar 2007 17:07:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/question-to-brian/m-p/1674725#M158979</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-14T17:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: Question to Brian</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/question-to-brian/m-p/1674726#M158980</link>
      <description>Thanks again Brian.</description>
      <pubDate>Wed, 14 Mar 2007 20:48:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/question-to-brian/m-p/1674726#M158980</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-14T20:48:31Z</dc:date>
    </item>
  </channel>
</rss>

