ilogic inconsistent relationship

ilogic inconsistent relationship

R.nnie
Contributor Contributor
241 Views
0 Replies
Message 1 of 1

ilogic inconsistent relationship

R.nnie
Contributor
Contributor

I have a couple of rules which aid in the assembly of pressure vessel shells to nozzles and flanges. The objective is to make the assembly fully automated with parts available from CC.

At the moment I have the rule to place pipes and flanges from CC into the assembly and constrain them to the hole axis in the shell. This seems to work great where I run into an issue is when I try to add additional constrain > OutsideProjection(Value1, MateName2, ShellPlane, NozzleProjection) < to offset the nozzle origin plane from the shell plane. As seen in the picture. 
When I create this constrain manually and type in the offset value it seems to work great, but when I write a rule with user input variables each relationship displays an inconsistent error, but it is not fully constrained yet.
Please see the images attached. 

Any help is greatly appreciated. 

 

Sub Main()
	
	For index = 2 To 21
		
		'Mate(Value, MateName, ShellAxis)
		Mate("L" & index, "N" & index, "M" & index)	
		
		'OutsideProjection(Value1, MateName2, ShellPlane, NozzleProjection)
		OutsideProjection("L" & index, "O" & index, "P" & index, "G" & index)
		
    Next
	
	
End Sub 
						
Sub Mate(Value, MateName, ShellAxis)
	
	Dim File As String = ExcelFilePath
	GoExcel.Open(File, "Sheet1")
	Dim NozzleName As String = GoExcel.CellValue(Value)
	Dim Name As String = GoExcel.CellValue(MateName)
	Dim Axis As String = GoExcel.CellValue(ShellAxis)
	
	If Component.IsActive(NozzleName) = True Then
		'MessageBox.Show(NozzleName, "Msg title")
		Constraints.AddMate(Name, NozzleName, "Work Axis1", "SHELL", Axis,
                   		solutionType := MateConstraintSolutionTypeEnum.kAlignedSolutionType)	
	End If		
	
End Sub 


Sub OutsideProjection(Value1, MateName2, ShellPlane, NozzleProjection)
   
   Dim AssyFile As String = ExcelFilePath
	GoExcel.Open(AssyFile, "Sheet1")
	Dim NozzleName1 As String = GoExcel.CellValue(Value1)
	Dim Name2 As String = GoExcel.CellValue(MateName2)
	Dim Plane As String = GoExcel.CellValue(ShellPlane)    
	Dim Projection As String = GoExcel.CellValue(NozzleProjection)  
	'Dim Units As String = GoExcel.CellValue(Unitsmm)  
	'MessageBox.Show(Projection & Units, "Msg title")
	
	If Component.IsActive(NozzleName1) = True Then
		Constraints.AddMate(Name2, NozzleName1, "YZ Plane", "SHELL", Plane, Projection)
						'solutionType := MateConstraintSolutionTypeEnum.kOpposedSolutionType)
	End If	

End Sub 

 

0 Likes
242 Views
0 Replies
Replies (0)