I one part family which has a Connection (1:M formula). It points to a supbart collection from one other part family.
The formula is:
Result = Me.ActivePart(1).Collection
It is user editable.
I'm adding a Add/Copy/Delete Button for the Connection, creating a grid-control in the parent's UI.
As result - the button is grayed. So I can't add items to the Connection.
If I add items manually to the subpart collections - the items apears in the Connection and a visible in the grid.
How could I make Add/Copy/Delete button working ?
I want to use it to add items to the connection which I expect to get added to the subpart collection.
Thank you for being out first Forum post!
I will pass this around our group here at Siemens to see if we can get an answer for you. Meanwhile, if anyone else has any thoughts on this please jump in. These forums are not intended to be be formal but more of a free flowing conversation.
The Add/Copy/Delete buttons are really intended for use with subpart collections, because connections always point to parts that already exist in the product control model.
What you could do is tie the grid to the connection - so it would display all the parts that belong to the connection.
The Add/Copy/Delete buttons could then be tied to a subpart collection that is included in the aforementioned connection, such that an addition or deletion of a part in the subpart collection would still be reflected in the grid.
thank you for the answer.
But our subpart collection belongs to another PartFamily, so we cant use it UI on the step we are working on.
Actually that is why we are using the connection.
It looks strange that we have an ablility to choose a 'collection' when placing the buttons on a UI panel, but can't use it.
That makes me thinking that I'm doing something wrong.
No, you're not doing anything wrong - I think that would be a good candidate for removal because a connection should always reflect parts that are already in the PCM.
Have you considered placing the add/delete/copy buttons (that are tied to the subpart collection) inside a sub form control? The sub form can point through a connection to the part family where the subpart collection actually resides.