Arpad_Jacso
Computer
- Aug 22, 2019
- 14
Hi,
I would like to group parameters of an assembly by few conditions, to give them value later but i stuck to do that.
Set parameters2 = oProductDoc.Product.ReferenceProduct.Parameters '(oProductDoc has been set earlier)
Dim parnames As Collection
k=1
If CheckParmA.Value = "False" Then '(CheckParm has been set earlier)
For j = 1 To parameters2.Count
If InStr(parameters2.Item(j).name, "Component Activation State") > 0 Then
If InStr(parameters2.Item(j).name, oProductDoc.Product.Products.Item(i).name) > 0 Then
parnames.Add parameters2.Item(j) '-----------------> this is not working
k = k + 1
parameters2.Item(j).Value = "False"
End If
End If
Next
End If
For z = 1 To k
parnames(z).Value = "True" '---------------> this is not working
Next
Do you have any idea how to manage that?
I would like to group parameters of an assembly by few conditions, to give them value later but i stuck to do that.
Set parameters2 = oProductDoc.Product.ReferenceProduct.Parameters '(oProductDoc has been set earlier)
Dim parnames As Collection
k=1
If CheckParmA.Value = "False" Then '(CheckParm has been set earlier)
For j = 1 To parameters2.Count
If InStr(parameters2.Item(j).name, "Component Activation State") > 0 Then
If InStr(parameters2.Item(j).name, oProductDoc.Product.Products.Item(i).name) > 0 Then
parnames.Add parameters2.Item(j) '-----------------> this is not working
k = k + 1
parameters2.Item(j).Value = "False"
End If
End If
Next
End If
For z = 1 To k
parnames(z).Value = "True" '---------------> this is not working
Next
Do you have any idea how to manage that?