Cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple occurrences of the same part instance in a connection. Is it possible?

Experimenter
Experimenter

Is it possible to add multiple occurrences of the same part into a connection?

 

For example, if I write the following formula for connection:

 

Dim c As New Collection

c.Add(Me.Items(1))
c.Add(Me.Items(1))
c.Add(Me.Items(1))
c.Add(Me.Items(1))
c.Add(Me.Items(1))

'c.Count = 5

Result = c

 

I get only one instance of Me.Items(1) in connection. Actual task is more complex (Visio tree diagram traversal), but the result is the same: there is only the first occurrence of each part in resulting connection.

4 REPLIES 4
Highlighted

Re: Multiple occurrences of the same part instance in a connection. Is it possible?

Siemens Genius Siemens Genius
Siemens Genius

It is not possible. The Rulestream connection is implemented as a dictionary, which allows only 1 instance of the same object.

Re: Multiple occurrences of the same part instance in a connection. Is it possible?

Experimenter
Experimenter
Hi Rick, thank you for your answer.

Re: Multiple occurrences of the same part instance in a connection. Is it possible?

Valued Contributor
Valued Contributor

Hi,

 

Like Rick said, with a Rulestream connection, only unique instances are held...but, what is that you are trying to do that needs to be bound by the following constraints:

1) Must be a RS connection object (as against an arraylist)

2) Must be multiple instances of exact same Object (vs. 1 instance with a quantity of 5)

 

Dharmesh

Re: Multiple occurrences of the same part instance in a connection. Is it possible?

Solution Partner Experimenter Solution Partner Experimenter
Solution Partner Experimenter

Hi Dharmesh,

 

I was going to use such connection to traverse an assembly tree like shown on a picture and build an indented BOM.

 

2019-01-28 10_24_31-Rulestream ETO Engineer.png

 

For example, partfamily instance 'LB00-1100002-002 - Screw ISO 1234' has 3 occurrences. Each occurrence has its own parent, quantity and level.

 

I've already solved this problem another way.