How can I add a new custom document property? (In this case, to a draft file). I'm using C++ (VC++2010).
I wanted to use
pNewProperty->Name = newPropertyName;
but there is no put method associated with the Property interface. I have to do this on an open document, since the file will be cached from Teamcenter.
Posted by: Paul DobsonPost date: 3/5/2012 9:46:06 AM
Should have tried a bit harder before posting!
For anyone who also wants to know, the solution is:
SolidEdgeFramework::PropertySetsPtr pPropertySets = NULL;
SolidEdgeFramework::PropertiesPtr pProperties = NULL;
SolidEdgeFramework::PropertyPtr pProperty = NULL;
pPropertySets = pDoc->Properties;
pProperties = pPropertySets->Item(_T("Custom"));
pProperty = pProperties->Add(_T("Property Name"), _T("Property Value"));
Posted by: Paul DobsonPost date: 3/5/2012 10:12:07 AM