Hi,
I was wondering if anyone here has some experience using the AddParticipant method of the (assembly) HoleFeature object. After creating a hole feature in an Inventor *assembly*, the user can choose which occurrences in this assembly are affected by this feature. In the API, this is done through AddParticipant. This method requires the hole feature object to be part of an assembly component definition, and the provided occurrence to be a leaf occurrence. Let's say I have somes files: one main assembly, called Top-level assembly.iam. This assembly contains a hole feature and a sub-assembly, called Sub-assembly.iam. This sub-assembly is composed of Component<1 through 4>.ipt. All files are dependent on Skeleton.ipt for their respective parameters.
The problem I'm running into is the apparent inability to add participants to the top-level assembly hole feature, which are occurrences contained in a sub-assembly, via a rule ran from Skeleton.ipt. In other words, I cannot add the occurrences of Component<1 through 4>.ipt to the hole feature in Top-level assembly.iam, when the method is called from a document that is not Top-level assembly.iam. I check whether or not the occurrences are leaf occurrences through ComponentOccurrence.SubOccurrences.Count=0.
Does anyone see a fundemental problem with what I'm trying to accomplish here?
Hi,
Could you provide very simple and non-confidential sample files for what you are doing?
Cheers,