Extract a list of iPart key column

Extract a list of iPart key column

MCADAEPFW
Enthusiast Enthusiast
757 Views
2 Replies
Message 1 of 3

Extract a list of iPart key column

MCADAEPFW
Enthusiast
Enthusiast

Hello all I am not sure if this is possible or maybe I'm not wording the search right, but is there a way for iLogic to extract a list of a key column in an iPart Factory from a member in an assembly?  

 

For example I'd like to be able to select an iPart custom or not and have iLogic grab and array list of a particular key value. 

 Snag_df56917.png

I would like the iLogic code to make an array list of the 'MATL' key column made up of the three options that I can then use in an 'Input List' to select a different material.   

 

Anyone know what I'm talking about.  This should be easy but I can't seem to find any code that will do that.

 

Thanks for your help.

0 Likes
Accepted solutions (1)
758 Views
2 Replies
Replies (2)
Message 2 of 3

marcin_otręba
Advisor
Advisor
Accepted solution

for example:

Dim ipart As iPartMember = ThisDoc.Document.SelectSet.Item(1).definition.ipartmember
Dim ifa As iPartFactory = ipart.ParentFactory

Dim columvalues As New List(Of String)
Dim column As iPartTableColumn
For Each column In ifa.TableColumns
	If column.DisplayHeading.ToString = "MATL" Then
		Dim cell As iPartTableCell
		For Each cell In column
		columvalues.Add(cell.Value)
		Next
	End If
Next

 

Hi, maybe you want to check my apps:


DrawingTools   View&ColoringTools   MRUFolders

0 Likes
Message 3 of 3

MCADAEPFW
Enthusiast
Enthusiast
thank you that works I'll have to tweak it a little bit to get it to work.

Is there a way to only add unique columnvalues to the list as it loops through? For example if the columvalue is already in the list then skip it.

Also is there a way to pull out the 'Key Column Header Values'?
0 Likes