capturing the browser node name in a pattern with iLogic

capturing the browser node name in a pattern with iLogic

Anonymous
Not applicable
849 Views
5 Replies
Message 1 of 6

capturing the browser node name in a pattern with iLogic

Anonymous
Not applicable

Hello,

I am looking to see if I can use iLogic to capture the browser node name (highlighted below) of items contained in a pattern. I would like to be able to grab the name based on it's position in the element (1,2,3...). For example 16773-Nut is position 1.

 

Capture.PNG

0 Likes
Accepted solutions (1)
850 Views
5 Replies
Replies (5)
Message 2 of 6

clutsa
Collaborator
Collaborator
Accepted solution

This needs work if you have more then one pattern but it's a good start

Dim doc = ThisDoc.Document
Dim 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 "*Component 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")

 

If I've helped you, please help me by supporting this idea.
Mass Override for Each Model State

Custom Glyph Icon for iMates

0 Likes
Message 3 of 6

Anonymous
Not applicable

Thank you that helps tremendously! I assume I could do the same for items in a folder?

 

0 Likes
Message 4 of 6

Anonymous
Not applicable

I am just getting back on this project and I failed after many attempts to modify the code to work with a nested pattern.  Could anyone provide some assistance? Thanks!

0 Likes
Message 5 of 6

clutsa
Collaborator
Collaborator

Can you start a new thread and post a image of the nested browser tree and add more detail as to what you want in the end? We can do loops that look for certain conditions but we need to know what those conditions are. 

If I've helped you, please help me by supporting this idea.
Mass Override for Each Model State

Custom Glyph Icon for iMates

0 Likes
Message 6 of 6

Anonymous
Not applicable

will do

0 Likes