<?xml encoding=”UTF-8″>By Adam Nagy
When trying to figure out how to do something in the Inventor API, then almost always the best way to go is: do it in the UI, investigate in the API.
So I registered in the Content Center my own part, created a SIZE property then mapped it to Project.Description (Design Tracking Properties:Description):
Now using the API I can find out how the SIZE property got mapped to Project.Description property:
Public Sub CCtest()
Dim cc As ContentCenter
Set cc = ThisApplication.ContentCenter
Dim ctvn As ContentTreeViewNode
Set ctvn = cc.TreeViewTopNode. _
ChildNodes("Features"). _
ChildNodes("English"). _
ChildNodes("Block")
Dim cf As ContentFamily
Set cf = ctvn.Families(1)
Dim ctc As ContentTableColumn
Set ctc = cf.TableColumns("Size")
If ctc.HasPropertyMap Then
Dim psid As String
Dim pid As String
Call ctc.GetPropertyMap(psid, pid)
Debug.Print "PropertySetId = " & psid
Debug.Print "PropertyId = " & pid
End If
End Sub
Result:
PropertySetId = {32853F0F-3444-11d1-9E93-0060B03C1CA6}
PropertyId = 29
So basically you just have to look for the given property set in Document.PropertySets and use its InternalName property, then look for the property inside it and use the Property‘s PropId.


Leave a Reply