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

'TURNING COLLAR PARTS PHANTOM WHEN BELLOWS TYPE = FORMED
If O_COLLAR_SEWING_TYPE= "FORMED" Then
ThisApplication.ActiveDocument.ComponentDefinition.RepresentationsManager.LevelofDetailRepresentations("Ilogic").Activate
iLogicVb.UpdateWhenDone=True
' set a reference to the assembly component definintion
Dim oAsmCompDef As AssemblyComponentDefinition
oAsmCompDef = ThisApplication.ActiveDocument.ComponentDefinition

	If Component.IsActive("ROUND_FLANGE1")=True Then
	Dim oOccurrence As ComponentOccurrence
	For Each oOccurrence In oAsmCompDef.Occurrences
		If oOccurrence.Name.Contains("ROUND_FLANGE1") = True Then
		oOccurrence.Definition.BOMStructure = 51971 'Phantom
		End If 
		Next 
	End If 
	 
	
	If Component.IsActive("ROUND_FLANGE2")=True Then
	For Each oOccurrence In oAsmCompDef.Occurrences
		If oOccurrence.Name.Contains("ROUND_FLANGE2") = True Then
		oOccurrence.Definition.BOMStructure = 51971 'Phantom
		End If
		Next 
	End If
	
	
	If Component.IsActive("ROUND_FLANGE3")=True Then
	For Each oOccurrence In oAsmCompDef.Occurrences
		If oOccurrence.Name.Contains("ROUND_FLANGE3") = True Then
		oOccurrence.Definition.BOMStructure = 51971 'Phantom
		End If
		Next 
	End If
	
	
	If Component.IsActive("ROUND_FLANGE4")=True Then
	For Each oOccurrence In oAsmCompDef.Occurrences
		If oOccurrence.Name.Contains("ROUND_FLANGE4") = True Then
		oOccurrence.Definition.BOMStructure = 51971 'Phantom
		End If
		Next 
	End If

	
	If Component.IsActive("ROUND_COLLAR1")=True Then
	For Each oOccurrence In oAsmCompDef.Occurrences
		If oOccurrence.Name.Contains("ROUND_COLLAR1") = True Then
		oOccurrence.Definition.BOMStructure = 51971 'Phantom
		End If
		Next 
	End If
	 
	
	If Component.IsActive("ROUND_COLLAR2")=True Then
	For Each oOccurrence In oAsmCompDef.Occurrences
		If oOccurrence.Name.Contains("ROUND_COLLAR2") = True Then
		oOccurrence.Definition.BOMStructure = 51971 'Phantom
		End If
		Next 
	End If
 
	
	If Component.IsActive("EXPANDED_COLLAR1")=True Then
	For Each oOccurrence In oAsmCompDef.Occurrences
		If oOccurrence.Name.Contains("EXPANDED_COLLAR1") = True Then
		oOccurrence.Definition.BOMStructure = 51971 'Phantom
		End If
		Next 
	End If

	
	If Component.IsActive("EXPANDED_COLLAR2")=True Then
	For Each oOccurrence In oAsmCompDef.Occurrences
		If oOccurrence.Name.Contains("EXPANDED_COLLAR2") = True Then
		oOccurrence.Definition.BOMStructure = 51971 'Phantom
		End If
		Next 
	End If
	 
	
	If Component.IsActive("CONE_END1")=True Then
	For Each oOccurrence In oAsmCompDef.Occurrences
		If oOccurrence.Name.Contains("CONE_END1") = True Then
		oOccurrence.Definition.BOMStructure = 51971 'Phantom
		End If
		Next 
	End If
	 
	
	If Component.IsActive("CONE_END2")=True Then
	For Each oOccurrence In oAsmCompDef.Occurrences
		If oOccurrence.Name.Contains("CONE_END2") = True Then
		oOccurrence.Definition.BOMStructure = 51971 'Phantom
		End If
		Next 
	End If
	
End If


If O_COLLAR_SEWING_TYPE= "SEWN" Then
ThisApplication.ActiveDocument.ComponentDefinition.RepresentationsManager.LevelofDetailRepresentations("Ilogic").Activate
iLogicVb.UpdateWhenDone=True
' set a reference to the assembly component definintion
Dim oAsmCompDef As AssemblyComponentDefinition
oAsmCompDef = ThisApplication.ActiveDocument.ComponentDefinition
	
	If Component.IsActive("ROUND_FLANGE1")=True Then
	Dim oOccurrence As ComponentOccurrence
	For Each oOccurrence In oAsmCompDef.Occurrences
		If oOccurrence.Name.Contains("ROUND_FLANGE1") = True Then
		oOccurrence.Definition.BOMStructure = 51970 'NORMAL
		End If
	Next 
	End If 
	If Component.IsActive("ROUND_FLANGE2")=True Then
	For Each oOccurrence In oAsmCompDef.Occurrences
		If oOccurrence.Name.Contains("ROUND_FLANGE2") = True Then
		oOccurrence.Definition.BOMStructure = 51970 'NORMAL
		End If
	Next 
	End If 
	If Component.IsActive("ROUND_FLANGE3")=True Then
	For Each oOccurrence In oAsmCompDef.Occurrences
		If oOccurrence.Name.Contains("ROUND_FLANGE3") = True Then
		oOccurrence.Definition.BOMStructure = 51970 'NORMAL
		End If
	Next 
	End If 
	If Component.IsActive("ROUND_FLANGE4")=True Then
	For Each oOccurrence In oAsmCompDef.Occurrences
		If oOccurrence.Name.Contains("ROUND_FLANGE4") = True Then
		oOccurrence.Definition.BOMStructure = 51970 'NORMAL
		End If
	Next 
	End If 
	If Component.IsActive("ROUND_COLLAR1")=True Then
	For Each oOccurrence In oAsmCompDef.Occurrences
		If oOccurrence.Name.Contains("ROUND_COLLAR1") = True Then
		oOccurrence.Definition.BOMStructure = 51970 'NORMAL
		End If
	Next 
	End If 
	If Component.IsActive("ROUND_COLLAR2")=True Then
	For Each oOccurrence In oAsmCompDef.Occurrences
		If oOccurrence.Name.Contains("ROUND_COLLAR2") = True Then
		oOccurrence.Definition.BOMStructure = 51970 'NORMAL
		End If
	Next 
	End If 
	If Component.IsActive("EXPANDED_COLLAR1")=True Then
	For Each oOccurrence In oAsmCompDef.Occurrences
		If oOccurrence.Name.Contains("EXPANDED_COLLAR1") = True Then
		oOccurrence.Definition.BOMStructure = 51970 'NORMAL
		End If
	Next 
	End If 
	If Component.IsActive("EXPANDED_COLLAR2")=True Then
	For Each oOccurrence In oAsmCompDef.Occurrences
		If oOccurrence.Name.Contains("EXPANDED_COLLAR2") = True Then
		oOccurrence.Definition.BOMStructure = 51970 'NORMAL
		End If
	Next 
	End If 
	If Component.IsActive("CONE_END1")=True Then
	For Each oOccurrence In oAsmCompDef.Occurrences
		If oOccurrence.Name.Contains("CONE_END1") = True Then
		oOccurrence.Definition.BOMStructure = 51970 'NORMAL
		End If
	Next 
	End If 
	If Component.IsActive("CONE_END2")=True Then
	For Each oOccurrence In oAsmCompDef.Occurrences
		If oOccurrence.Name.Contains("CONE_END2") = True Then
		oOccurrence.Definition.BOMStructure = 51970 'NORMAL
		End If
	Next 
	End If 
End If 
'------------------------------------------------------------------------------------------------------------------------------------------------------------------
'VARIABLE SWITCH COLLAR1
If (24>=O_COLLAR1 And O_COLLAR1>12) Then
	VARIABLE_1 = O_COLLAR1/2
	Else
	VARIABLE_1=0
End If 

If (36>=O_COLLAR1 And O_COLLAR1>24) Then
	VARIABLE_3 = O_COLLAR1/3
	Else
	VARIABLE_3 = 0
End If

If (48>=O_COLLAR1 And O_COLLAR1>36) Then
	VARIABLE_5 = O_COLLAR1/4
	Else
	VARIABLE_5 = 0
End If

If (60>=O_COLLAR1 And O_COLLAR1>48) Then
	VARIABLE_7 = O_COLLAR1/5
	Else
	VARIABLE_7= 0
End If 

'VARIABLE SWITCH COLLAR2
If (24>=O_COLLAR2 And O_COLLAR2>12) Then
	VARIABLE_2 = O_COLLAR2/2
	Else
	VARIABLE_2=0
End If 

If (36>=O_COLLAR2 And O_COLLAR2>24) Then
	VARIABLE_4 = O_COLLAR2/3
	Else
	VARIABLE_4 = 0
End If

If (48>=O_COLLAR2 And O_COLLAR2>36) Then
	VARIABLE_6 = O_COLLAR2/4
	Else
	VARIABLE_6 = 0
End If

If (60>=O_COLLAR2 And O_COLLAR2>48) Then
	VARIABLE_8 = O_COLLAR2/5
	Else
	VARIABLE_8 = 0
End If 

'CLAMP SELECTION SEWN O_COLLAR1 CODE

		Component.IsActive("11000063") = False
		Component.IsActive("11000064") = False
		Component.IsActive("11000065") = False
		Component.IsActive("11000066") = False
		Component.IsActive("11000067") = False
		Component.IsActive("11000068") = False
		Component.IsActive("11000069") = False
		Component.IsActive("11000070") = False
		Component.IsActive("11000071") = False
		Component.IsActive("11000138") = False 
		
If O_CLAMP Then
	If (O_COLLAR1<= 1.25) And O_COLLAR1> 0 Then'Or (O_COLLAR2<=1.25) Then
			Component.IsActive("11000063") = True
			'quantity = ThisBOM.CalculateQuantity("Model Data", "11000063")
			
		ElseIf (1.75>=O_COLLAR1 And O_COLLAR1>1.25) Then'Or (1.75>=O_COLLAR2 And O_COLLAR2>1.25) Then
			Component.IsActive("11000064") = True
			'quantity = ThisBOM.CalculateQuantity("Model Data", "11000064")
	
		ElseIf (2.25>=O_COLLAR1 And O_COLLAR1>1.75)Then' Or (2.25>=O_COLLAR2 And O_COLLAR2>1.75) Then
			Component.IsActive("11000065") = True
			'quantity = ThisBOM.CalculateQuantity("Model Data", "11000065")
	
		ElseIf (2.75>=O_COLLAR1 And O_COLLAR1>2.25)Then' Or (2.75>=O_COLLAR2 And O_COLLAR2>2.25) Then
			Component.IsActive("11000066") = True
			'quantity = ThisBOM.CalculateQuantity("Model Data", "11000066")
	
		ElseIf (4>=O_COLLAR1 And O_COLLAR1>2.75)Then' Or (4>=O_COLLAR2 And O_COLLAR2>2.75) Then
			Component.IsActive("11000067") = True
			'quantity = ThisBOM.CalculateQuantity("Model Data", "11000067")
	
		ElseIf (6>=O_COLLAR1 And O_COLLAR1>4) Then'Or (6>=O_COLLAR2 And O_COLLAR2>4) Then
			Component.IsActive("11000068") = True
			'quantity = ThisBOM.CalculateQuantity("Model Data", "11000068")
	
		ElseIf (7>=O_COLLAR1 And O_COLLAR1>6) Then'Or (7>=O_COLLAR2 And O_COLLAR2>6) Then
			Component.IsActive("11000069") = True
			'quantity = ThisBOM.CalculateQuantity("Model Data", "11000069")
	
		ElseIf (8.25>=O_COLLAR1 And O_COLLAR1>7) Then'Or (8.25>=O_COLLAR2 And O_COLLAR2>7) Then
			Component.IsActive("11000070") = True
			'quantity = ThisBOM.CalculateQuantity("Model Data", "11000070")
	
		ElseIf (10>=O_COLLAR1 And O_COLLAR1>8.25)Then' Or (10>=O_COLLAR2 And O_COLLAR2>8.25) Then
			Component.IsActive("11000138") = True
			'quantity = ThisBOM.CalculateQuantity("Model Data", "11000138")
		
		ElseIf (12>=O_COLLAR1 And O_COLLAR1>10)Then' Or (12>=O_COLLAR2 And O_COLLAR2>10) Then
			Component.IsActive("11000071") = True
			'quantity = ThisBOM.CalculateQuantity("Model Data", "11000071")
		 	
	'O_CLAMP >12ID<=24
		ElseIf (24>=O_COLLAR1 And O_COLLAR1>12) Then'Or (24>=O_COLLAR2 And O_COLLAR2>12) Then
				If (7>=VARIABLE_1 And VARIABLE_1>6)Then' Or (7>=VARIABLE_2 And VARIABLE_2>6) Then
					Component.IsActive("11000069") = True
					'quantity = ThisBOM.CalculateQuantity("Model Data", "11000069") 
					
					'ThisBOM.OverrideQuantity("Model Data","11000069", 2)
					
				ElseIf (8.25>=VARIABLE_1 And VARIABLE_1>7) Then'Or (8.25>=VARIABLE_2 And VARIABLE_2>7) Then
					Component.IsActive("11000070") = True
					'quantity = ThisBOM.CalculateQuantity("Model Data", "11000070")
				'ThisBOM.OverrideQuantity("Model Data","11000070",2)
			
				ElseIf (10>=VARIABLE_1 And VARIABLE_1>8.25)Then' Or (10>=VARIABLE_2 And VARIABLE_2>8.25) Then
					Component.IsActive("11000138") = True
					'quantity = ThisBOM.CalculateQuantity("Model Data", "11000138")
					 
					'ThisBOM.OverrideQuantity("Model Data","11000138", 2)
			
				ElseIf (12>=VARIABLE_1 And VARIABLE_1>10) Then'Or (12>=VARIABLE_2 And VARIABLE_2>10) Then
					Component.IsActive("11000071") = True
					'quantity = ThisBOM.CalculateQuantity("Model Data", "11000071")
				'ThisBOM.OverrideQuantity("Model Data","11000071", 2)
				End If 
			
	'Clamp 24>ID<=36
		ElseIf (36>=O_COLLAR1 And O_COLLAR1>24) Then'Or (36>=O_COLLAR2 And O_COLLAR2>24) Then
		
				If (8.25>=VARIABLE_3 And VARIABLE_3>7) Then'Or (8.25>=VARIABLE_4 And VARIABLE_4>7) Then
					Component.IsActive("11000070") = True
					'quantity = ThisBOM.CalculateQuantity("Model Data", "11000070")
				'ThisBOM.OverrideQuantity("Model Data","11000070", 3)
		
				ElseIf (10>=VARIABLE_3 And VARIABLE_3>8.25)Then' Or (10>=VARIABLE_4 And VARIABLE_4>8.25) Then
					Component.IsActive("11000138") = True
					'quantity = ThisBOM.CalculateQuantity("Model Data", "11000138")
				'ThisBOM.OverrideQuantity("Model Data","11000138", 3)
			
				ElseIf (12>=VARIABLE_3 And VARIABLE_3>10)Then' Or (12>=VARIABLE_4 And VARIABLE_4>10) Then
					Component.IsActive("11000071") = True
					'quantity = ThisBOM.CalculateQuantity("Model Data", "11000071")
				'ThisBOM.OverrideQuantity("Model Data","11000071", 3)
				End If
		
	'Clamp 36>ID<=48
		ElseIf (48>=O_COLLAR1 And O_COLLAR1>36) Then'Or (48>=O_COLLAR2 And O_COLLAR2>36) Then
		
				If (10>=VARIABLE_5 And VARIABLE_5>8.25) Then'Or (10>=VARIABLE_6 And VARIABLE_6>8.25) Then
					Component.IsActive("11000138") = True
					'quantity = ThisBOM.CalculateQuantity("Model Data", "11000138")
				'ThisBOM.OverrideQuantity("Model Data","11000138", 4)
			
				ElseIf (12>=VARIABLE_5 And VARIABLE_5>10) Then'Or (12>=VARIABLE_6 And VARIABLE_6>10) Then
					Component.IsActive("11000071") = True
					'quantity = ThisBOM.CalculateQuantity("Model Data", "11000071")
				'ThisBOM.OverrideQuantity("Model Data","11000071", 4)
				End If 
		
	'Clamp 48>ID<=60
		ElseIf (60>=O_COLLAR1 And O_COLLAR1>48) Then'Or (60>=O_COLLAR2 And O_COLLAR2>48) Then
	
			If (10>=VARIABLE_7 And VARIABLE_7>8.25) Then'Or (10>=VARIABLE_8 And VARIABLE_8>8.25) Then
				Component.IsActive("11000138") = True
				'quantity = ThisBOM.CalculateQuantity("Model Data", "11000138")
			'ThisBOM.OverrideQuantity("Model Data","11000138", 5)
			
			ElseIf (12>=VARIABLE_7 And VARIABLE_7>10) Then'Or (12>=VARIABLE_8 And VARIABLE_8>10) Then
				Component.IsActive("11000071") = True
				'quantity = ThisBOM.CalculateQuantity("Model Data", "11000071")
			'ThisBOM.OverrideQuantity("Model Data","11000071", 5) 
			End If
		
	End If 
End If 

'COLLAR 2
If O_CLAMP Then
	If  (O_COLLAR2<=1.25) And O_COLLAR2> 0 Then
			Component.IsActive("11000063") = True
			'quantity = ThisBOM.CalculateQuantity("Model Data", "11000063")
			
		ElseIf  (1.75>=O_COLLAR2 And O_COLLAR2>1.25) Then
			Component.IsActive("11000064") = True
			'quantity = ThisBOM.CalculateQuantity("Model Data", "11000064")
	
		ElseIf (2.25>=O_COLLAR2 And O_COLLAR2>1.75) Then
			Component.IsActive("11000065") = True
			'quantity = ThisBOM.CalculateQuantity("Model Data", "11000065")
	
		ElseIf  (2.75>=O_COLLAR2 And O_COLLAR2>2.25) Then
			Component.IsActive("11000066") = True
			'quantity = ThisBOM.CalculateQuantity("Model Data", "11000066")
	
		ElseIf  (4>=O_COLLAR2 And O_COLLAR2>2.75) Then
			Component.IsActive("11000067") = True
			'quantity = ThisBOM.CalculateQuantity("Model Data", "11000067")
	
		ElseIf  (6>=O_COLLAR2 And O_COLLAR2>4) Then
			Component.IsActive("11000068") = True
			'quantity = ThisBOM.CalculateQuantity("Model Data", "11000068")
	
		ElseIf  (7>=O_COLLAR2 And O_COLLAR2>6) Then
			Component.IsActive("11000069") = True
			'quantity = ThisBOM.CalculateQuantity("Model Data", "11000069")
	
		ElseIf  (8.25>=O_COLLAR2 And O_COLLAR2>7) Then
			Component.IsActive("11000070") = True
			'quantity = ThisBOM.CalculateQuantity("Model Data", "11000070")
	
		ElseIf  (10>=O_COLLAR2 And O_COLLAR2>8.25) Then
			Component.IsActive("11000138") = True
			'quantity = ThisBOM.CalculateQuantity("Model Data", "11000138")
		
		ElseIf  (12>=O_COLLAR2 And O_COLLAR2>10) Then
			Component.IsActive("11000071") = True
			'quantity = ThisBOM.CalculateQuantity("Model Data", "11000071")
		 
'O_CLAMP >12ID<=24
		ElseIf  (24>=O_COLLAR2 And O_COLLAR2>12) Then
				If  (7>=VARIABLE_2 And VARIABLE_2>6) Then
					Component.IsActive("11000069") = True
					'quantity = ThisBOM.CalculateQuantity("Model Data", "11000069") 
				
					'ThisBOM.OverrideQuantity("Model Data",11000069, 2)
				

				ElseIf  (8.25>=VARIABLE_2 And VARIABLE_2>7) Then
					Component.IsActive("11000070") = True
					'quantity = ThisBOM.CalculateQuantity("Model Data", "11000070")
					'ThisBOM.OverrideQuantity("Model Data",11000070,2)
			
				ElseIf (10>=VARIABLE_2 And VARIABLE_2>8.25) Then
					Component.IsActive("11000138") = True
					'quantity = ThisBOM.CalculateQuantity("Model Data", "11000138")
						'ThisBOM.OverrideQuantity("Model Data","11000138", 2)
				

				ElseIf  (12>=VARIABLE_2 And VARIABLE_2>10) Then
					Component.IsActive("11000071") = True
					'quantity = ThisBOM.CalculateQuantity("Model Data", "11000071")
					'ThisBOM.OverrideQuantity("Model Data","11000071",2)
				End If 
			
		'Clamp 24>ID<=36
		ElseIf  (36>=O_COLLAR2 And O_COLLAR2>24) Then
		
				If  (8.25>=VARIABLE_4 And VARIABLE_4>7) Then
					Component.IsActive("11000070") = True
					'quantity = ThisBOM.CalculateQuantity("Model Data", "11000070")
					'ThisBOM.OverrideQuantity("Model Data","11000070", 3)
		
				ElseIf  (10>=VARIABLE_4 And VARIABLE_4>8.25) Then
					Component.IsActive("11000138") = True
					'quantity = ThisBOM.CalculateQuantity("Model Data", "11000138")
					'ThisBOM.OverrideQuantity("Model Data","11000138", 3)
			
				ElseIf  (12>=VARIABLE_4 And VARIABLE_4>10) Then
					Component.IsActive("11000071") = True
					'quantity = ThisBOM.CalculateQuantity("Model Data", "11000071")
					'ThisBOM.OverrideQuantity("Model Data","11000071", 3)
				End If
		
		'Clamp 36>ID<=48
		ElseIf  (48>=O_COLLAR2 And O_COLLAR2>36) Then
		
				If  (10>=VARIABLE_6 And VARIABLE_6>8.25) Then
					Component.IsActive("11000138") = True
					'quantity = ThisBOM.CalculateQuantity("Model Data", "11000138")
					'ThisBOM.OverrideQuantity("Model Data","11000138", 4)
			
				ElseIf  (12>=VARIABLE_6 And VARIABLE_6>10) Then
					Component.IsActive("11000071") = True
					'quantity = ThisBOM.CalculateQuantity("Model Data", "11000071")
					'ThisBOM.OverrideQuantity("Model Data","11000071", 4)
				
				End If 
		
	'Clamp 48>ID<=60
		ElseIf (60>=O_COLLAR2 And O_COLLAR2>48)  Then
	
			If  (10>=VARIABLE_8 And VARIABLE_8>8.25) Then
				Component.IsActive("11000138") = True
				'quantity = ThisBOM.CalculateQuantity("Model Data", "11000138")
				'ThisBOM.OverrideQuantity("Model Data","11000138", 5)
			
			ElseIf (12>=VARIABLE_8 And VARIABLE_8>10)  Then
				Component.IsActive("11000071") = True
				'quantity = ThisBOM.CalculateQuantity("Model Data", "11000071")
				'ThisBOM.OverrideQuantity("Model Data","11000071", 5) 
			End If
		
	End If 
End If 


'----------------------------------------------------------------------------------------------------------------------------------------------

'O_CLAMP >12ID<=24
If O_CLAMP Then
 	If (O_COLLAR1<= 1.25) And O_COLLAR1> 0 Then'Or (O_COLLAR2<=1.25) Then
			'Component.IsActive("11000063") = True
			quantity = ThisBOM.CalculateQuantity("Model Data", "11000063")
			
		ElseIf (1.75>=O_COLLAR1 And O_COLLAR1>1.25) Then'Or (1.75>=O_COLLAR2 And O_COLLAR2>1.25) Then
			'Component.IsActive("11000064") = True
			quantity = ThisBOM.CalculateQuantity("Model Data", "11000064")
	
		ElseIf (2.25>=O_COLLAR1 And O_COLLAR1>1.75)Then' Or (2.25>=O_COLLAR2 And O_COLLAR2>1.75) Then
			'Component.IsActive("11000065") = True
			quantity = ThisBOM.CalculateQuantity("Model Data", "11000065")
	
		ElseIf (2.75>=O_COLLAR1 And O_COLLAR1>2.25)Then' Or (2.75>=O_COLLAR2 And O_COLLAR2>2.25) Then
			'Component.IsActive("11000066") = True
			quantity = ThisBOM.CalculateQuantity("Model Data", "11000066")
	
		ElseIf (4>=O_COLLAR1 And O_COLLAR1>2.75)Then' Or (4>=O_COLLAR2 And O_COLLAR2>2.75) Then
			'Component.IsActive("11000067") = True
			quantity = ThisBOM.CalculateQuantity("Model Data", "11000067")
	
		ElseIf (6>=O_COLLAR1 And O_COLLAR1>4) Then'Or (6>=O_COLLAR2 And O_COLLAR2>4) Then
			'Component.IsActive("11000068") = True
			quantity = ThisBOM.CalculateQuantity("Model Data", "11000068")
	
		ElseIf (7>=O_COLLAR1 And O_COLLAR1>6) Then'Or (7>=O_COLLAR2 And O_COLLAR2>6) Then
			'Component.IsActive("11000069") = True
			quantity = ThisBOM.CalculateQuantity("Model Data", "11000069")
	
		ElseIf (8.25>=O_COLLAR1 And O_COLLAR1>7) Then'Or (8.25>=O_COLLAR2 And O_COLLAR2>7) Then
			'Component.IsActive("11000070") = True
			quantity = ThisBOM.CalculateQuantity("Model Data", "11000070")
	
		ElseIf (10>=O_COLLAR1 And O_COLLAR1>8.25)Then' Or (10>=O_COLLAR2 And O_COLLAR2>8.25) Then
			'Component.IsActive("11000138") = True
			quantity = ThisBOM.CalculateQuantity("Model Data", "11000138")
		
		ElseIf (12>=O_COLLAR1 And O_COLLAR1>10)Then' Or (12>=O_COLLAR2 And O_COLLAR2>10) Then
			'Component.IsActive("11000071") = True
			quantity = ThisBOM.CalculateQuantity("Model Data", "11000071")
	
	
		ElseIf (24>=O_COLLAR1 And O_COLLAR1>12) Then'Or (24>=O_COLLAR2 And O_COLLAR2>12) Then
				If (7>=VARIABLE_1 And VARIABLE_1>6)Then' Or (7>=VARIABLE_2 And VARIABLE_2>6) Then
						ThisBOM.OverrideQuantity("Model Data","11000069", 2)
				
				ElseIf (8.25>=VARIABLE_1 And VARIABLE_1>7) Then'Or (8.25>=VARIABLE_2 And VARIABLE_2>7) Then
					
					ThisBOM.OverrideQuantity("Model Data","11000070",2)
			
				ElseIf (10>=VARIABLE_1 And VARIABLE_1>8.25)Then' Or (10>=VARIABLE_2 And VARIABLE_2>8.25) Then
					
						ThisBOM.OverrideQuantity("Model Data","11000138", 2)
	
			
				ElseIf (12>=VARIABLE_1 And VARIABLE_1>10) Then'Or (12>=VARIABLE_2 And VARIABLE_2>10) Then
					
					ThisBOM.OverrideQuantity("Model Data","11000071", 2)
				End If 
			
		'Clamp 24>ID<=36
		ElseIf (36>=O_COLLAR1 And O_COLLAR1>24) Then'Or (36>=O_COLLAR2 And O_COLLAR2>24) Then
		
				If (8.25>=VARIABLE_3 And VARIABLE_3>7) Then'Or (8.25>=VARIABLE_4 And VARIABLE_4>7) Then
					
					ThisBOM.OverrideQuantity("Model Data","11000070", 3)
		
				ElseIf (10>=VARIABLE_3 And VARIABLE_3>8.25)Then' Or (10>=VARIABLE_4 And VARIABLE_4>8.25) Then
					
					ThisBOM.OverrideQuantity("Model Data","11000138", 3)
			
				ElseIf (12>=VARIABLE_3 And VARIABLE_3>10)Then' Or (12>=VARIABLE_4 And VARIABLE_4>10) Then
					
					ThisBOM.OverrideQuantity("Model Data","11000071", 3)
				End If
		
		'Clamp 36>ID<=48
		ElseIf (48>=O_COLLAR1 And O_COLLAR1>36) Then'Or (48>=O_COLLAR2 And O_COLLAR2>36) Then
		
				If (10>=VARIABLE_5 And VARIABLE_5>8.25) Then'Or (10>=VARIABLE_6 And VARIABLE_6>8.25) Then
					
					ThisBOM.OverrideQuantity("Model Data","11000138", 4)
			
				ElseIf (12>=VARIABLE_5 And VARIABLE_5>10) Then'Or (12>=VARIABLE_6 And VARIABLE_6>10) Then
					
					ThisBOM.OverrideQuantity("Model Data","11000071", 4)
				
				End If 
		
	'Clamp 48>ID<=60
		ElseIf (60>=O_COLLAR1 And O_COLLAR1>48) Then'Or (60>=O_COLLAR2 And O_COLLAR2>48) Then
	
			If (10>=VARIABLE_7 And VARIABLE_7>8.25) Then'Or (10>=VARIABLE_8 And VARIABLE_8>8.25) Then
				
				ThisBOM.OverrideQuantity("Model Data","11000138", 5)
			
			ElseIf (12>=VARIABLE_7 And VARIABLE_7>10) Then'Or (12>=VARIABLE_8 And VARIABLE_8>10) Then
				
				ThisBOM.OverrideQuantity("Model Data","11000071", 5) 
			End If
		
	End If 
End If 

'COLLAR 2
If O_CLAMP Then		
'O_CLAMP >12ID<=24
	If  (O_COLLAR2<=1.25)And O_COLLAR2> 0 Then
			'Component.IsActive("11000063") = True
			quantity = ThisBOM.CalculateQuantity("Model Data", "11000063")
			
		ElseIf  (1.75>=O_COLLAR2 And O_COLLAR2>1.25) Then
			'Component.IsActive("11000064") = True
			quantity = ThisBOM.CalculateQuantity("Model Data", "11000064")
	
		ElseIf (2.25>=O_COLLAR2 And O_COLLAR2>1.75) Then
			'Component.IsActive("11000065") = True
			quantity = ThisBOM.CalculateQuantity("Model Data", "11000065")
	
		ElseIf  (2.75>=O_COLLAR2 And O_COLLAR2>2.25) Then
			'Component.IsActive("11000066") = True
			quantity = ThisBOM.CalculateQuantity("Model Data", "11000066")
	
		ElseIf  (4>=O_COLLAR2 And O_COLLAR2>2.75) Then
			'Component.IsActive("11000067") = True
			quantity = ThisBOM.CalculateQuantity("Model Data", "11000067")
	
		ElseIf  (6>=O_COLLAR2 And O_COLLAR2>4) Then
			'Component.IsActive("11000068") = True
			quantity = ThisBOM.CalculateQuantity("Model Data", "11000068")
	
		ElseIf  (7>=O_COLLAR2 And O_COLLAR2>6) Then
			'Component.IsActive("11000069") = True
			quantity = ThisBOM.CalculateQuantity("Model Data", "11000069")
	
		ElseIf  (8.25>=O_COLLAR2 And O_COLLAR2>7) Then
			'Component.IsActive("11000070") = True
			quantity = ThisBOM.CalculateQuantity("Model Data", "11000070")
	
		ElseIf  (10>=O_COLLAR2 And O_COLLAR2>8.25) Then
			'Component.IsActive("11000138") = True
			quantity = ThisBOM.CalculateQuantity("Model Data", "11000138")
		
		ElseIf  (12>=O_COLLAR2 And O_COLLAR2>10) Then
			'Component.IsActive("11000071") = True
			quantity = ThisBOM.CalculateQuantity("Model Data", "11000071")

		ElseIf  (24>=O_COLLAR2 And O_COLLAR2>12) Then
				If  (7>=VARIABLE_2 And VARIABLE_2>6) Then
					
						ThisBOM.OverrideQuantity("Model Data","11000069", 2)
				

				ElseIf  (8.25>=VARIABLE_2 And VARIABLE_2>7) Then
					
					ThisBOM.OverrideQuantity("Model Data","11000070",2)
			
				ElseIf (10>=VARIABLE_2 And VARIABLE_2>8.25) Then
					
						ThisBOM.OverrideQuantity("Model Data","11000138", 2)
				

				ElseIf  (12>=VARIABLE_2 And VARIABLE_2>10) Then
					
					ThisBOM.OverrideQuantity("Model Data","11000071",2)
				End If 
			
		'Clamp 24>ID<=36
		ElseIf  (36>=O_COLLAR2 And O_COLLAR2>24) Then
		
				If  (8.25>=VARIABLE_4 And VARIABLE_4>7) Then
					
					ThisBOM.OverrideQuantity("Model Data","11000070", 3)
		
				ElseIf  (10>=VARIABLE_4 And VARIABLE_4>8.25) Then
					
					ThisBOM.OverrideQuantity("Model Data","11000138", 3)
			
				ElseIf  (12>=VARIABLE_4 And VARIABLE_4>10) Then
					
					ThisBOM.OverrideQuantity("Model Data","11000071", 3)
				End If
		
		'Clamp 36>ID<=48
		ElseIf  (48>=O_COLLAR2 And O_COLLAR2>36) Then
		
				If  (10>=VARIABLE_6 And VARIABLE_6>8.25) Then
					
					ThisBOM.OverrideQuantity("Model Data","11000138", 4)
			
				ElseIf  (12>=VARIABLE_6 And VARIABLE_6>10) Then
					
					ThisBOM.OverrideQuantity("Model Data","11000071", 4)
				
				End If 
		
	'Clamp 48>ID<=60
		ElseIf (60>=O_COLLAR2 And O_COLLAR2>48)  Then
	
			If  (10>=VARIABLE_8 And VARIABLE_8>8.25) Then
				
				ThisBOM.OverrideQuantity("Model Data","11000138", 5)
			
			ElseIf (12>=VARIABLE_8 And VARIABLE_8>10)  Then
				
				ThisBOM.OverrideQuantity("Model Data","11000071", 5) 
			End If
		
	End If 
End If