I'm having difficulty retrieving parameters associated with a one of my CustomParameterGroups. I have three custom groups...
1. Material Defaults - InternalName = MaterialDefaults
2. Room Defaults - InternalName = RoomDefaults
3. Room Constants - InternalName = RoomConstants
My Code (below) to retrieve parameters for Room Defaults works fine, but the code to retrieve Material Defaults does not. I've verified that the groups exist and that there are parameters assigned to every group however no matter what I do, the parameter count for the MaterialDefaults always returns 0. I can see via the parameters dialog that this simply isn't the case.
Any help would be greatly appreciated.
Marv
RoomDefault Code - Works
Private Sub GetRDParams()
Dim allParams As Parameters
allParams = InvDoc.ComponentDefinition.Parameters
For i = 1 To allParams.CustomParameterGroups.Count
If allParams.CustomParameterGroups.Item(i).InternalName = "RoomDefaults" Then
rdParams = allParams.CustomParameterGroups.Item(i)
End If
Next i
End Sub
MaterialDefault Code - doesn't work
Private Sub GetMDParams()
Dim allParams As Parameters
allParams = InvDoc.ComponentDefinition.Parameters
MsgBox(allParams.CustomParameterGroups.Count)
For i = 1 To allParams.CustomParameterGroups.Count
If allParams.CustomParameterGroups.Item(i).InternalName = "MaterialDefaults" Then
mdParams = allParams.CustomParameterGroups.Item(i)
End If
Next i
End Sub