Hello,
I'm trying to run a for loop to check a part's thickness parameter within an assembly but I do not know how to access that parameter from the assembly. Once I check that the thickness does not equal 1/4" I want to assign the sheet metal rule to be user defined. Here is what I got so far:
Dim SheetMetalRule As String = BODY_GAUGE & " " & SHEET_METAL_RULE
Dim assyDoc As AssemblyDocument
assyDoc = ThisApplication.ActiveDocument
Dim partDoc As Document
For Each partDoc In assyDoc.AllReferencedDocuments
If partDoc.ComponentDefinition.Parameters.UserParameters("THICK").Value = .25 Then
Else If partDoc.ComponentDefinition.Parameters.UserParams.Value <> .25 Then
ThisApplication.Documents.Open(partDoc.FullFileName, False)
SheetMetal.SetActiveStyle(SheetMetalRule)
partDoc.Save
partDoc.Close
End If
Next