You can also copy iproperties from one file to many others using Design Assistant..
http://knowledge.autodesk.com/support/inventor-products/getting-started/caas/CloudHelp/cloudhelp/201...
But if you need to do this quite often then an ilogic tool to pop up a form asking for the information then looping through all the parts should be pretty easy for someone with ilogic skills (I haven't sat down and learned it well enough to help)
Here is the only code I have..
It prompts for a few standard and custom iproperties via a message box then fills out the information..
But it only does it for the current open file..
I would think someone could make it work and loop through all open documents or something like that..
pDescription = InputBox("Enter value for 'Description'", "Description",iProperties.Value("Project", "Description"))
If pDescription = Nothing Then Exit Sub
iProperties.Value("Project", "Description") = pDescription
pRev = InputBox("Enter value for 'Revision'", "Revision",iProperties.Value("Project", "Revision Number"))
If pRev = Nothing Then Exit Sub
iProperties.Value("Project", "Revision Number") = pRev
'Requires a custom iProperty called "MATERIAL"
Dim CustMatl As New ArrayList
CustMatl.Add("Custom Material 1")
CustMatl.Add("Custom Material 2")
Try
'attempts to set the value.. If custom field not found it errors out, creates the property and tries again
iProperties.Value("Custom", "MATERIAL") = InputListBox("MATERIAL", CustMatl, iProperties.Value("Custom", "MATERIAL"), Title := "Material", ListName := "Material")
Catch
' Assume error means the property was not found
'define custom property collection
oCustomPropertySet = ThisDoc.Document.PropertySets.Item("Inventor User Defined Properties")
'create the custom property
oCustomPropertySet.Add("", "MATERIAL")
'set the custom property value
iProperties.Value("Custom", "MATERIAL") = InputListBox("MATERIAL", CustMatl, iProperties.Value("Custom", "MATERIAL"), Title := "Material", ListName := "Material")
End Try
'Requires a custom iProperty called FINISH
Dim CustFinish As New ArrayList
CustFinish.Add("Custom Finish 1")
CustFinish.Add("Custom Finish 2")
Try
'attempts to set the value.. If custom field not found it errors out, creates the property and tries again
iProperties.Value("Custom", "FINISH") = InputListBox("FINISH", CustFinish, iProperties.Value("Custom", "FINISH"), Title := "Finish", ListName := "Finish")
Catch
' Assume error means the property was not found
'define custom property collection
oCustomPropertySet = ThisDoc.Document.PropertySets.Item("Inventor User Defined Properties")
'create the custom property
oCustomPropertySet.Add("", "FINISH")
'set the custom property value
iProperties.Value("Custom", "FINISH") = InputListBox("FINISH", CustFinish, iProperties.Value("Custom", "FINISH"), Title := "Finish", ListName := "Finish")
End Try
'Requires a custom iProperty called FINISH PRETREATMENT
Dim FinishPretreatment As New ArrayList
FinishPretreatment.Add("Custom Pretreatment 1")
FinishPretreatment.Add("Custom Pretreatment 2")
Try
'attempts to set the value.. If custom field not found it errors out, creates the property and tries again
iProperties.Value("Custom", "FINISH PRETREATMENT") = InputListBox("FINISH PRETREATMENT", FinishPretreatment, iProperties.Value("Custom", "FINISH PRETREATMENT"), Title := "Finish Pretreatment", ListName := "Finish Pretreatment")
Catch
' Assume error means the property was not found
'define custom property collection
oCustomPropertySet = ThisDoc.Document.PropertySets.Item("Inventor User Defined Properties")
'create the custom property
oCustomPropertySet.Add("", "FINISH PRETREATMENT")
'set the custom property value
iProperties.Value("Custom", "FINISH PRETREATMENT") = InputListBox("FINISH PRETREATMENT", FinishPretreatment, iProperties.Value("Custom", "FINISH PRETREATMENT"), Title := "Finish Pretreatment", ListName := "Finish Pretreatment")
End Try
'Requires a custom iProperty called ROHS
Dim Rohs As New ArrayList
Rohs.Add("(6/6) FINAL PRODUCT SHALL BE ROHS 6/6 COMPLIANT PER EU DIRECTIVE 2002/95/EC")
Rohs.Add("(5/6) FINAL PRODUCT SHALL BE ROHS 5/6 COMPLIANT (LEAD EXEMPT) PER EU DIRECTIVE 2002/95/EC")
Try
'attempts to set the value.. If custom field not found it errors out, creates the property and tries again
iProperties.Value("Custom", "ROHS") = InputListBox("ROHS", Rohs, iProperties.Value("Custom", "ROHS"), Title := "ROHS", ListName := "ROHS")
Catch
' Assume error means the property was not found
'define custom property collection
oCustomPropertySet = ThisDoc.Document.PropertySets.Item("Inventor User Defined Properties")
'create the custom property
oCustomPropertySet.Add("", "ROHS")
'set the custom property value
iProperties.Value("Custom", "ROHS") = InputListBox("ROHS", Rohs, iProperties.Value("Custom", "ROHS"), Title := "ROHS", ListName := "ROHS")
End Try
iLogicVb.UpdateWhenDone = True
-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570
Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269