Create User parameter with Multi Value list for all occurrences in assy.

Create User parameter with Multi Value list for all occurrences in assy.

hkempeneers
Advocate Advocate
722 Views
4 Replies
Message 1 of 5

Create User parameter with Multi Value list for all occurrences in assy.

hkempeneers
Advocate
Advocate

Hi,

From an assembly I try to provide all appearances with two new User parameters, each with its own Multi Value list.

The creation of the parameter is successful, but the creation of the Multi Value List cannot be achieved.

Here is a piece of the rule. (Also as attachment)

Does anyone know how in the line of MultiValue.Setlist I can tell the system for which parameter the list should be made for?

Many thanks in advance 😉

Rule 31.JPG

0 Likes
Accepted solutions (1)
723 Views
4 Replies
Replies (4)
Message 2 of 5

clutsa
Collaborator
Collaborator

Everything looks ok... The only thing I see is you don't set a default value for your multi list.

MultiValue.SetValueOptions(True, DefaultIndex := 0)

 Are you sure the parameters are "new" and not just the parameters that should have been deleted? You could also try running an update at the end.

InventorVb.DocumentUpdate()
If I've helped you, please help me by supporting this idea.
Mass Override for Each Model State

Custom Glyph Icon for iMates

0 Likes
Message 3 of 5

hkempeneers
Advocate
Advocate

Hi clutsa,

 

Setting a default value for the multi list doesn't work either.

We also use this programming directly in parts and assys and then everything works properly.

 

I delete the existing parameters (when present) to make sure that parameters with a new selection list are created.

0 Likes
Message 4 of 5

clutsa
Collaborator
Collaborator
Accepted solution
MultiValue.SetListInComponent(oOcc.Name, "Opperval...", "{....}", "Item1", "Item2", "Item3")
If I've helped you, please help me by supporting this idea.
Mass Override for Each Model State

Custom Glyph Icon for iMates

Message 5 of 5

hkempeneers
Advocate
Advocate

Hi Clutsa,

 

That works! Thank you.

0 Likes