Capturing the browser node name in a multi-level patterns with iLogic

Capturing the browser node name in a multi-level patterns with iLogic

Anonymous
Not applicable
228 Views
0 Replies
Message 1 of 1

Capturing the browser node name in a multi-level patterns with iLogic

Anonymous
Not applicable

I am looking for help modifying a code I found. The code below works great for single level patterns, however I would like to expand this to search multi-level patterns. The highlight items in the screen shot are the parts that I am attempting to grab the Browsers Node names.   

mlp.JPG

Dim doc = ThisDoc.DocumentDim

BrowserPane = doc.BrowserPanes("Model")

Dim TopNode = BrowserPane.TopNode

Dim CompNode As ComponentOccurrence

EndFound = False

For Each node As BrowserNode In TopNode.BrowserNodes 

   If node.BrowserNodeDefinition.Label Like "GAS MOUNTING PATTERN" Then EndFound = True

    If EndFound = True Then

        CompName = node.BrowserNodes.Item(1).BrowserNodes.Item(1).BrowserNodeDefinition.Label

        CompNode = doc.ComponentDefinition.Occurrences.ItemByName(CompName) 

       Exit For

    End If

Next

If Not CompNode Is Nothing Then MessageBox.Show("CompNodeName = " & CompNode.Name, "Title")

 

 

 

0 Likes
229 Views
0 Replies
Replies (0)