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: 

what's wrong?

0 REPLIES 0
Reply
Message 1 of 1
bkline1
132 Views, 0 Replies

what's wrong?

Hi,

I need help again... the attached code lets me iterate through my IAM. It shows all of the IPT's in the IAM including the IPT's in a Sub.IAM. what am I not including in the code to get it to show me the User Parameters of all the components. This will only show the User Parameters of the Top Level IAM.

Thanks in advance
Bill


Public Sub ManipulateScrollParameters()

' ' Checks to see that an assembly file is open and ready for edit.
' If ThisApplication.Documents.Count = 0 Then
' MsgBox "You Must Have A Scroll Development Assembly Model Active "
' Exit Sub
' End If
'
' ' Checks to make sure that a part document is not active.
' If ThisApplication.ActiveDocumentType <> kAssemblyDocumentObject Then
' MsgBox " You Must Close All Part Files And Have" & vbCrLf & _
' "Only A Fan Scoll Development Open For Edit "
' Exit Sub
' End If

Dim oAssemDoc As AssemblyDocument
Set oAssemDoc = ThisApplication.ActiveDocument

Dim oAssemCompDef As AssemblyComponentDefinition
Set oAssemCompDef = oAssemDoc.ComponentDefinition

Dim oCompOccs As ComponentOccurrences
Set oCompOccs = oAssemCompDef.Occurrences

Dim oCompOcc As ComponentOccurrence
For Each oCompOcc In oCompOccs

Debug.Print oCompOcc.Name

Dim oIvCompOccEnum As ComponentOccurrencesEnumerator
Set oIvCompOccEnum = oCompOcc.SubOccurrences

Dim i As Integer
For i = 1 To oIvCompOccEnum.Count

Dim aa As Object
Set aa = oIvCompOccEnum.Item(i)

Debug.Print aa.Name

Next

Dim oIvParams As Parameters
Set oIvParams = oAssemCompDef.Parameters

Dim oIvUserParams As UserParameters
Set oIvUserParams = oIvParams.UserParameters

Dim oIvUserParam As UserParameter
Set oIvUserParam = oIvUserParams.Item(i)

Dim iNumParams As Long
Debug.Print "User Parameters"
For iNumParams = 1 To oIvUserParams.Count

Debug.Print " Name: " & oIvUserParams.Item(iNumParams).Name

Next

Next

End Sub
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