iLogic iPart Update Factory Table Reference Paramter

iLogic iPart Update Factory Table Reference Paramter

Anonymous
Not applicable
591 Views
1 Reply
Message 1 of 2

iLogic iPart Update Factory Table Reference Paramter

Anonymous
Not applicable

Hey Guys!

 

I'm looking for a solution of the following Problem:

 

If i change some values in my iPart i get the following Error Message, which tells me to update the current values in the iPart table.

ErrorErrorI'm to lazy to go through all rows in the iPart, so I tried to fix the problem with generating all the Parts.

See following code:

 

Sub Main()
	
	Dim partDoc As PartDocument
	partDoc = ThisApplication.ActiveDocument
	
	Dim oDoc As PartDocument = ThisDoc.Document 
	Dim oDef As PartComponentDefinition = oDoc.ComponentDefinition 
	Dim initRowIndex As Integer
	Dim oFactory As iPartFactory = oDef.iPartFactory
	Dim oRow As iPartTableRow
	
	If partDoc.ComponentDefinition.IsiPartFactory _
		Or partDoc.ComponentDefinition.IsiPartMember Then

		For Each oRow In oFactory.TableRows
		
		On Error Resume Next 
		oFactory.DefaultRow = oRow 'get on current row
		oFactory.CreateMember(oRow) 
		InventorVb.DocumentUpdate()
		iLogicVb.UpdateWhenDone = True
		Next
	Else
		MessageBox.Show("This is no iPart")
	End If
End Sub

 So the code works, generating all parts. But it does not update the table.

If I change the current row after I run the code I get the same error Message as above.

 

Is there a possibility to update the table without going through the error messages?

 

Thanks for your help!

 

 

 

0 Likes
592 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

My apologies, my German is not up to completely translating the text on the screen shot and I am too lazy to transcribe it into Google Translate. 🙃  It seems that you are being told that certain table parameters do not match what is currently in memory and is asking if you would like to change the parameter to match.

 

My understanding -imperfect as it may be- is that when you edit the table outside of the Inventor Table Editing tool (with excel for example), any changes to the table values for the active row are not pushed.  This sets up a conflict between the current values in memory and the table values.  Hence, the error message.  I have found the following to work OK:  After editing , answer no to the popup.  Change the active row and answer no again to the popup.  This will clear the issue.

Good luck!

0 Likes