cancel
Showing results for 
Search instead for 
Did you mean: 

Identify balloon(s) with associative origin to a specific balloon

Legend
Legend

To change a balloon from a circle to a divided circle balloon I create the divided circle balloon using the leader and attribute information of the circle balloon and then delete the circle balloon.
 If any other balloon(s) use the deleted balloon for the associative origin then these other balloon(s) are marked as "Object for associative origin has been deleted or suppressed".
 My problem is how can I identify any balloon(s) that use the balloon I want to delete so that I can
 change their associative origin/type?

 

Frank Swinkels

4 REPLIES

Re: Identify balloon(s) with associative origin to a specific balloon

Genius
Genius
I am not 100% sure but I think if the property "NumberOfAssociativities" is greater than zero there are objects associative connected.
With the method "GetAssociativity(index As Int32)" you should get each associative object at specified index.
(not tested, just remembering from the API docs)

Re: Identify balloon(s) with associative origin to a specific balloon

Genius
Genius
At a deeper look I see that this is not referring to the associative objects you are looking but to the objects the given annotation is associatively linked.
Seems that you have to go through all IDSymbols and see if they are linked to other IDSymbols, remember them and relink them later. Could be a performance problem depending on the number of IDSymbols you have...

Re: Identify balloon(s) with associative origin to a specific balloon

Phenom
Phenom

I was thinking along the same lines as @josch; you would have to query the other objects to see what was associated to the ID symbol of interest (remember that other annotations could also be associated to it such as notes, dimensions, etc). If you have multiple ID symbols to change, you could create a "map" of associativities saved as a dictionary (of IDSymbol, list (of annotation)) to speed up future searches.

 

Alternatively, before changing the symbol, you could iterate through the ID symbols to see if any are .IsRetained. Check again after making your change. If any become retained due to your edit, they almost assuredly were associated to the old symbol. You could then take action based on this information (undo the change to check the associativity, or something else).

 

The ID symbol may also be part of an "annotation stack". I'm not sure how this would affect a replacement such as you are doing.

Re: Identify balloon(s) with associative origin to a specific balloon

Legend
Legend

Thanks both for valuable input.  It does give me more to look at.

 

Frank Swinkels