Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Neuzzo
in reply to: Neuzzo

My mistake. The error is in "Case" declaration.

This is the correct one if someone need it:

 

Dim oDoc As PartDocument = ThisDoc.Document
Dim oSheetMetalComponentDef As Inventor.SheetMetalComponentDefinition = oDoc.ComponentDefinition

Select Case iProperties.Material
Case "811151 AISI 304 sp. 0.8 SB + PVC", "811503 AISI 430 sp. 0.8 2B", "811531 AISI 430 sp. 0.8 SB + PVC", "811535 AISI 430 sp. 0.8 SB + PVC"
		oSheetMetalComponentDef.SheetMetalStyles.Item("8/10 In aria - 304/430").Activate
		okUnfoldMethod = oSheetMetalComponentDef.UnfoldMethods.Item("8/10 In aria - 304/430")
		oSheetMetalComponentDef.UnfoldMethod = okUnfoldMethod

Case "801171 AISI 304 sp.1 2B", "811175 AISI 304 sp. 1 SB + PVC", "811541 AISI 430 sp. 1 SB + PVC", "811547 AISI 430 sp. 1 BA"
		oSheetMetalComponentDef.SheetMetalStyles.Item("10/10 In aria - 304/430").Activate
		okUnfoldMethod = oSheetMetalComponentDef.UnfoldMethods.Item("10/10 In aria - 304/430")
		oSheetMetalComponentDef.UnfoldMethod = okUnfoldMethod
		
Case "801181 AISI 304 sp. 1.2 2B", "811181 AISI 304 sp. 1.2 SB + PVC"
		oSheetMetalComponentDef.SheetMetalStyles.Item("12/10 In aria - 304/430").Activate
		okUnfoldMethod = oSheetMetalComponentDef.UnfoldMethods.Item("12/10 In aria - 304/430")
		oSheetMetalComponentDef.UnfoldMethod = okUnfoldMethod
		
Case "811191 AISI 304 sp. 1.5 SB + PVC", "811505 AISI 430 sp. 1.5 2B", "811585 AISI 430 sp. 1.5 BA + PVC"
		oSheetMetalComponentDef.SheetMetalStyles.Item("15/10 In aria - 304/430").Activate
		okUnfoldMethod = oSheetMetalComponentDef.UnfoldMethods.Item("15/10 In aria - 304/430")
		oSheetMetalComponentDef.UnfoldMethod = okUnfoldMethod

Case "801211 AISI 304 sp. 2 2B", "811194 AISI 304 sp. 2 SB + PVC", "811507 AISI 430 sp. 2 BA"
		oSheetMetalComponentDef.SheetMetalStyles.Item("20/10 In aria - 304/430").Activate
		okUnfoldMethod = oSheetMetalComponentDef.UnfoldMethods.Item("20/10 In aria - 304/430")
		oSheetMetalComponentDef.UnfoldMethod = okUnfoldMethod
		
Case "811196 AISI 304 sp. 3 SB + PVC", "811501 AISI 430 sp. 3 BA"
		oSheetMetalComponentDef.SheetMetalStyles.Item("30/10 In aria - 304/430").Activate
		okUnfoldMethod = oSheetMetalComponentDef.UnfoldMethods.Item("30/10 In aria - 304/430")
		oSheetMetalComponentDef.UnfoldMethod = okUnfoldMethod
		
Case "811813 ALLUMINATA sp. 0.8"
		oSheetMetalComponentDef.SheetMetalStyles.Item("8/10 In aria - FE/ZN/ALLUMINATA").Activate
		okUnfoldMethod = oSheetMetalComponentDef.UnfoldMethods.Item("8/10 In aria - FE/ZN/ALLUMINATA")
		oSheetMetalComponentDef.UnfoldMethod = okUnfoldMethod
		
Case "811817 ALLUMINATA sp. 1"
		oSheetMetalComponentDef.SheetMetalStyles.Item("10/10 In aria - FE/ZN/ALLUMINATA").Activate
		okUnfoldMethod = oSheetMetalComponentDef.UnfoldMethods.Item("10/10 In aria - FE/ZN/ALLUMINATA")
		oSheetMetalComponentDef.UnfoldMethod = okUnfoldMethod
		
Case "811819 ALLUMINATA sp. 1.5"
		oSheetMetalComponentDef.SheetMetalStyles.Item("15/10 In aria - FE/ZN/ALLUMINATA").Activate
		okUnfoldMethod = oSheetMetalComponentDef.UnfoldMethods.Item("15/10 In aria - FE/ZN/ALLUMINATA")
		oSheetMetalComponentDef.UnfoldMethod = okUnfoldMethod
		
Case "811823 ALLUMINATA sp. 2", "811931 Fe sp. 2", "811939 FE-ZINCATO sp. 2"
		oSheetMetalComponentDef.SheetMetalStyles.Item("20/10 In aria - FE/ZN/ALLUMINATA").Activate
		okUnfoldMethod = oSheetMetalComponentDef.UnfoldMethods.Item("20/10 In aria - FE/ZN/ALLUMINATA")
		oSheetMetalComponentDef.UnfoldMethod = okUnfoldMethod
		
Case "811937 Fe sp. 3", "811941 FE-ZINCATO sp. 3"
		oSheetMetalComponentDef.SheetMetalStyles.Item("30/10 In aria - FE/ZN/ALLUMINATA").Activate
		okUnfoldMethod = oSheetMetalComponentDef.UnfoldMethods.Item("30/10 In aria - FE/ZN/ALLUMINATA")
		oSheetMetalComponentDef.UnfoldMethod = okUnfoldMethod
End Select
Danilo "DannyGi" G.
Mechanical design engineer and product developer