Determine whether a part is a content center part or not

By Xiaodong Liang

Before 2011, you can use iProperties to check. Something needed to be aware:  there are 6 Property Sets for Standard or Custom: 1~4 are the property sets of a common part. 5th is [Content Library Component Properties], 6th is [ContentCenter]. The [Content Library Component Properties] (B9600981-DEE8-4547-8D7C-E525B3A1727A) can be always found in all CC parts. However, it’s Component_type property is not used by CC anymore and is also not set in current version. However it might work for older components coming from older releases. So to distinguish, you need to use the 6th [ContentCenter]. If it is a Custom part, there is only one property within this property set. The name is “IsCustomPart”. While if it is a Standard CC part, there are some properties to indicate the information of the CC such as family, member etc..

From Inventor 2011, API provided a direct flag to indicate if the part is Standard or Custom:
PartComponentDefinition.IsContentMember


Comments

2 responses to “Determine whether a part is a content center part or not”

  1. I want to know is there any method which can identify that whether part is a library part or a simple part.
    Basically
    I want to identify library and content centre parts. We are sometimes using content center parts and apart from that we had made numerous files which we are accessing from different folders. We are defining those folders while defining new project as a library.
    I want both library and content center files to be identified.

  2. @harsh To find if a part comes from a library folder, you need to use the DesignProjectManager.IsFileInActiveProject method. ProjectPathType argument will be set to kLibraryLocation if the file is in a library folder.

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading