Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Anonymous
999 Views, 4 Replies

iPartMemeber.ChangeRow custom parameters

Hi,

I am using VBA to look through a folder of Custom iParts and fix any that have lost connection to their iFactory.  It seems I can do this with regular iParts but not custom ones?

 

I'm having trouble with iPartMember.ChangeRow. I can call .ChangeRow(intRow) but I can't figure out how to specify custom properties. I have only one custom property, "Length". 

 

Here is my code:

Sub Test_iPartFolder()
    
    Dim sFile As String
    Const sPath As String = "C:\users\ntonkinson\desktop\102767\"
    Dim oDoc As Document
    Dim oIpart As iPartMember
 
    sFile = Dir(sPath & "*.ipt*")
    Do Until sFile = ""
        Set oDoc = ThisApplication.Documents.Open(sPath & sFile, False)
        If oDoc.ComponentDefinition.IsiPartMember = False Then GoTo NextFile
        Set oIpart = oDoc.ComponentDefinition.iPartMember
        If oIpart.HealthStatus <> kUpToDateHealth Then GoTo NextFile
        
        'to do: pre-load iFactory tables to determine ChangeRow
        
        'fix it
        Call oIpart.ChangeRow(668) 'works if I only call an int, but not if I use other arguments
'in this specific test case, I know I need to call row 668. Later I will add logic to determine what row is needed. oDoc.Update oDoc.Save NextFile: oDoc.Close DoEvents sFile = Dir Loop End Sub

 

This article and this post shows how to use custom properties but in my IDE method does not seem to support more than two arguments.

 

Environment:

Inventor 2015, no vault

Windows 7

 

Related posts:

https://knowledge.autodesk.com/support/inventor-products/troubleshooting/caas/discussion/t5/Inventor...

https://knowledge.autodesk.com/support/inventor-products/troubleshooting/caas/discussion/t5/Inventor...

https://forums.autodesk.com/t5/inventor-customization/change-the-parameters-of-a-custom-ipart-insert...

https://forums.autodesk.com/t5/inventor-customization/how-to-use-ipartmember-changerow-method-thank-...

https://knowledge.autodesk.com/support/inventor-products/learn-explore/caas/CloudHelp/cloudhelp/2014...

Tags (2)