Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CustomParameterGroups

0 REPLIES 0
Reply
Message 1 of 1
hozz__
194 Views, 0 Replies

CustomParameterGroups

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

 

Tags (1)
0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report