Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
HermJan.Otterman
in reply to: spencer

hello Spencer,

 

are the parts that you create custom parts are standard parts and will they be used many times?

 

If you create standard parts, with you own parameters, location will be somewhere in a library.

the name of the part should be automaticaly created in the content center part, (combination of columns and user input)

 

If you do it that way, you don't need to check if the file exists, Inventor will do that for you.

 

 

 

I used this:

 

 

 

Dim oFamily As Inventor.ContentFamily = Nothing

 

For Each oFamily In oContentNode.Families

If oFamily.DisplayName = FamilyName Then

Exit For

End If

Next

 

Dim errorMessage As Inventor.MemberManagerErrorsEnum = Nothing

Dim strContentPartFileName As String = Nothing

Dim strErrorMessage As String = Nothing

strContentPartFileName = oFamily.CreateMember(RowNumber, errorMessage, strErrorMessage, , False, , CustomInput)

 

In my assembly there are already (dummy) parts that can be replaced

 

'Replace the existing occurrence with the newly created one.

oOcc.Replace(strContentPartFileName, False)

 

the CustomInput is the nameValueMap.

 

If this answers your question then please select "Accept as Solution"
Kudo's are also appreciated Smiley Wink

Succes on your project, and have a nice day

Herm Jan