Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I am trying to create a rule that will loop through all parts in my assembly and will create "user parameter" according to the filename of part.
I have something like this but the rule is adding all parameters to my top assembly not single parts and I stopped here and I don't know how to go on now.
thank you in advance for your help.
Dim oDoc As AssemblyDocument = ThisApplication.ActiveDocument Dim oCompDef As AssemblyComponentDefinition = oDoc.ComponentDefinition Dim oOcc As ComponentOccurrence Dim oOcc_s As ComponentOccurrences = oCompDef.Occurrences Dim oUserParams As UserParameters = oCompDef.Parameters.UserParameters For Each oOcc In oOcc_s If oOcc.Name.Contains("-P-") = True Then oUserParams.AddByValue("IOM", "10", UnitsTypeEnum.kTextUnits) Else End If Next
Solved! Go to Solution.