Skip to main content
5-Regular Member
May 11, 2026
Question

Custom attributes on Product / Library / Project contexts: best practice?

  • May 11, 2026
  • 1 reply
  • 17 views

Hello,

In my current project, I need to define custom attributes on context objects (Product, Library, and Project).

I'm wondering what the recommended approach is:

  • Subtyping the OOTB context types (wt.pdmlink.PDMLinkProduct, wt.inf.library.WTLibrary, wt.projmgmt.admin.Project2) to add the attributes on the subtypes, or
  • Modifying the OOTB types directly through the Type and Attribute Manager?

My main concerns are upgrade safety and long-term maintainability. Subtyping feels cleaner, but I'm not sure if context types behave differently from regular object types in that regard, particularly when it comes to container creation and template resolution.

Does PTC have any official documentation?

Thanks in advance.

1 reply

avillanueva
23-Emerald I
23-Emerald I
May 11, 2026

Do you mean Soft typing or sub-typing. Subtyping would be creating a modified Java class subtype of that object. Soft Typing would be via the Type and Attribute manager? Strongly recommend soft typing since there is no DB modeling or custom classes involved. 

As for adding attributes to the main object or what I assume you meant, soft typing, you need to ask yourself if these attributes would be applicable to all instances or could come along for the ride. Remember when you create a Product, Library or Project, you need to answer at time of creation which soft type you mean to create. There is no going back, no changing your mind and no deletion. Far easier to avoid that decision and deal with the attributes. 

You can change your mind on attributes, remove them or change them. You can be assured that soft types or custom addition attributes will be supported with upgrades and long term maintainability. 

https://support.ptc.com/help/windchill/r13.0.2.0/en/#page/Windchill_Help_Center/typeattr/TypeMgrAbout.html