- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
This happened when tried to read PropertyMap values from a Content Center Family using VBA macro. (Full story in topic: iLogic: How to retireve values from ContentTableColumn.GetPropertyMap Method?)
I create make VBA macro for reading properties from a FamilyTableColumn. And test it on a little modified copy of ISO 7098 washer.
VBA code snippet
For Each oColumn In oFamilyTableColumns
With oColumn
Debug.Print "DataType = " & .DataType
Debug.Print "DisplayHeading = " & .DisplayHeading
Debug.Print "Expression = " & .Expression
Debug.Print "HasPropertyMap = " & .HasPropertyMap
Debug.Print "InternalName = " & .InternalName
Debug.Print "KeyColumnOrder = " & .KeyColumnOrder
Debug.Print "Type = " & .Type
Debug.Print "Units = " & .Units
Dim s1 As String
Dim s2 As String
If .HasPropertyMap Then
Call oColumn.GetPropertyMap(s1, s2)
End If
Debug.Print "PropertySetId = " & s1
Debug.Print "PropertyIdentifier = " & s2
Debug.Print "---------------------------"
End With
Next oColumn
Output:
Blocks before deleted for better readability (all of them have HasPropertyMap = False )
---------------------------
DataType = 14595
DisplayHeading = Designation
Expression = {NND}
HasPropertyMap = False
InternalName = SIZE
KeyColumnOrder = 0
Type = 50422528
Units =
PropertySetId =
PropertyIdentifier =
---------------------------
DataType = 14595
DisplayHeading = Size Designation
Expression = {NND}
HasPropertyMap = True
InternalName = DESIGNATION
KeyColumnOrder = 0
Type = 50422528
Units =
PropertySetId = {32853F0F-3444-11d1-9E93-0060B03C1CA6}
PropertyIdentifier = 52
---------------------------
DataType = 14595
DisplayHeading = File Name
Expression = Copy of "ISO 7089" & "-" & {NND}&_&{MATERIAL}
HasPropertyMap = True
InternalName = FILENAME
KeyColumnOrder = 0
Type = 50422528
Units =
When it hits column "File Name", GetPropertyMap Method fails with following error:
This error is usually thrown during attempt to modify locked/read-only object.
But this Family is not read-only and - as you can see in log block above the last (DESIGNATION) - PropertyMap here was got successfully.
So it means, problem is column specific. This is screenshot of Column Properties
No Map set here, but HasPropertyMap = True (!)
It's possible that some PropertyMap was set here before and then "removed" (in GUI - this column was never modified via VBA, iLogic etc by me). Needs future investigation, but I don't have time for that, now.
Inventor 2022, Windows 10 Pro
Sorry for bad English.
Solved! Go to Solution.