Message 1 of 2
How to get the number and individual objects of the members of a iPartFactory

Not applicable
12-12-2005
02:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I have a Part which I converted into an iPartFactory, using the "Create iPart" options under the "Tools" menu. Now, programmatically, I get the PartComponentDefinition for this and query for whether this is a iPartFactory using the code below:
hr=((PartDocumentPtr)pCurrentDocument)->get_ComponentDefinition(&pComponentDef);
hr =pComponentDef->get_IsiPartFactory(&bIsFactory);
The above code is successful. Now I need additional info-, like to get the number of members in this part factory. But I dodnot find any API that gives me the number of members in this PartFactory. Additionally, I want to activate all the members of this IPartFactory one by one and then at the end re-activate the original member again.
As per my understanding there should be an API in the iPartFactory Object get the numbers of members and then to get all the "iPartMember" objects . But, I couldnot find such member functions. I feel my concept of factory and members is distorted here 🙂 Further, what is the signifacnce of "iPartMember" and "IsiPartMember" methods in the "PartComponentDefinition" object. This looks a bit weird to me.
Summarizing my problem:
1>how to get the number of members of Factory
2>how to get the individual members
3>how to activate a partical member
Any info- with this regard will set me on the correct path.
Regards,
Amol
I have a Part which I converted into an iPartFactory, using the "Create iPart" options under the "Tools" menu. Now, programmatically, I get the PartComponentDefinition for this and query for whether this is a iPartFactory using the code below:
hr=((PartDocumentPtr)pCurrentDocument)->get_ComponentDefinition(&pComponentDef);
hr =pComponentDef->get_IsiPartFactory(&bIsFactory);
The above code is successful. Now I need additional info-, like to get the number of members in this part factory. But I dodnot find any API that gives me the number of members in this PartFactory. Additionally, I want to activate all the members of this IPartFactory one by one and then at the end re-activate the original member again.
As per my understanding there should be an API in the iPartFactory Object get the numbers of members and then to get all the "iPartMember" objects . But, I couldnot find such member functions. I feel my concept of factory and members is distorted here 🙂 Further, what is the signifacnce of "iPartMember" and "IsiPartMember" methods in the "PartComponentDefinition" object. This looks a bit weird to me.
Summarizing my problem:
1>how to get the number of members of Factory
2>how to get the individual members
3>how to activate a partical member
Any info- with this regard will set me on the correct path.
Regards,
Amol