iLogic Pattern component issues

iLogic Pattern component issues

Anonymous
Not applicable
502 Views
7 Replies
Message 1 of 8

iLogic Pattern component issues

Anonymous
Not applicable

I am trying to drive a pattern with iLogic and keep running into a problem.

I am working on a walkway which has 3 requirements based on slop angle.

 

1. 0-10° No Cleats

2. 10-15° Cleats spaced @ 450mm

3. 15-18° Cleats spaced @ 400mm

4. 18-20° Cleats spaced @ 350mm

 

I can make case 2, 3 & 4 work without a problem, but when I drive the model below 10° I run into an issue which I can't find a way to resolve.

 

My iLogic code removes the Cleat, and the Pattern below 10°

When I drive it back above 10° it adds the cleat and makes the pattern

All good so far...

 

Problem is, the parameter for the Cleat Spacing gets re-written as a number, rather than staying a linked parameter.

So when I drive it above 15° the spacing doesn't change.

 

Below is my iLogic. Does anybody out there have some suggestion as to how I can make this work?

 

Select Case PITCH
	
Case 0 To 9.9


	CLEAT_SPC = 450
	CLEAT_NO = Ceil((WW_LG - 300) / CLEAT_SPC)

Case 10 To 14.9
	
	Dim CLEAT_600 = Components.Add("CLEAT 600", "GW340.iam")
	Constraints.AddFlush("C BASE", "CLEAT 600", "BASE", "SW01 MESH", "MESH TOP")
	Constraints.AddFlush("C MID", "CLEAT 600", "CTR", "SW01 MESH", "MESH CTR")
	Constraints.AddMate("C EDGE", "CLEAT 600", "MID", "SW01 MESH", "MESH START", offset := - (CLEAT_SPC / 2))
		
	CLEAT_SPC = 450
	CLEAT_NO = Ceil((WW_LG - 300) / CLEAT_SPC)
	
	Dim CLEAT_Pattern = Patterns.AddRectangular("CLEAT Pattern", "CLEAT 600", CLEAT_NO, CLEAT_SPC, "SW01 MESH", "Z Axis", columnNaturalDirection := False, rowCount := 1, rowOffset := 1.0 in, rowEntityName := "Y Axis", rowNaturalDirection := False)
	
	
Case 14.9 To 17.9
	
	CLEAT_SPC = 400
	CLEAT_NO = Ceil((WW_LG - 300) / CLEAT_SPC)
	
Case >= 18
	
	CLEAT_SPC = 350
	CLEAT_NO = Ceil((WW_LG - 300) / CLEAT_SPC)
	
End Select

 

I have tried re-placing the cleat, and remaking the pattern for each condition, but run into issues there also...

0 Likes
503 Views
7 Replies
Replies (7)
Message 2 of 8

Anonymous
Not applicable

Cleat PatternCleat Pattern

Here's an image to help show what I am trying to achieve...

0 Likes
Message 3 of 8

chandra.shekar.g
Autodesk Support
Autodesk Support

@Anonymous,

 

Can you please provide non confidential data to investigate?

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 4 of 8

Anonymous
Not applicable

Hello Chandra,

 

I have attached a Pack & Go with the assembly currently shown above 10°

If you drive it by the iLogic Form, and keep it above 10° you will see that the Cleat Spacing updates for each condition.

When you drive it below 10° the Cleat, and Pattern, are removed.

When you drive it back over 10° the Cleat reappears ad the Pattern is reformed... all good so far.

However, the linked parameters for the Pattern, CLEAT_NO and CLEAT_SPC have become un-linked .

This means that the Spacing won't update for the other 2 conditions, 14.9 to 17.9, and >=18

 

Thank you in advance for offering assistance with my problem.

 

Darren Lammertse

Product & Process Design Engineer

Sayfa Systems

0 Likes
Message 5 of 8

chandra.shekar.g
Autodesk Support
Autodesk Support

@Anonymous ,

 

File is missing. Can you please provide missing file? (SD907.20.ipt)

Missing_File.PNG

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 6 of 8

Anonymous
Not applicable

Hello Chandra,

 

Missing file attached...

0 Likes
Message 7 of 8

chandra.shekar.g
Autodesk Support
Autodesk Support

@Anonymous,

 

Thanks for providing missing file.

Select Case PITCH
	
Case 0 To 9.9


	CLEAT_SPC = 450
	CLEAT_NO = Ceil((WW_LG - 300) / CLEAT_SPC)
	
	Patterns.Delete("CLEAT Pattern")
	Components.Delete("CLEAT 600")


Case 10 To 14.9
	
	Dim CLEAT_600 = Components.Add("CLEAT 600", "GW340.iam")
	Constraints.AddFlush("C BASE", "CLEAT 600", "BASE", "SW01 MESH", "MESH TOP")
	Constraints.AddFlush("C MID", "CLEAT 600", "CTR", "SW01 MESH", "MESH CTR")
	Constraints.AddMate("C EDGE", "CLEAT 600", "MID", "SW01 MESH", "MESH START", offset := - (CLEAT_SPC / 2))
		
	CLEAT_SPC = 450
	CLEAT_NO = Ceil((WW_LG - 300) / CLEAT_SPC)
	
	Dim CLEAT_Pattern = Patterns.AddRectangular("CLEAT Pattern", "CLEAT 600", CLEAT_NO, CLEAT_SPC, "SW01 MESH", "Z Axis", columnNaturalDirection := False, rowCount := 1, rowOffset := 1.0 in, rowEntityName := "Y Axis", rowNaturalDirection := False)
	
	
Case 14.9 To 17.9
	
	CLEAT_SPC = 400
	CLEAT_NO = Ceil((WW_LG - 300) / CLEAT_SPC)
	
Case >= 18
	
	CLEAT_SPC = 350
	CLEAT_NO = Ceil((WW_LG - 300) / CLEAT_SPC)
	
End Select

While testing iLogic code, it is found that "CLEAT_SPC" is defined after creating new pattern in Case 10 To 14.9. That's why CLEAT_SPC is not changing for more than 15 deg.

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 8 of 8

Anonymous
Not applicable

Hello Chandra,

 

I have found that the only way for this to work properly is to delete the part, and the pattern, for every case.

Then recreate the part, and pattern, after specifying the spacing. see below...

 

Select Case PITCH
	
Case 0 To 9.9

	Patterns.Delete("CLEAT Pattern")
	Components.Delete("CLEAT 600")

Case 10 To 14.9
	
	Patterns.Delete("CLEAT Pattern")
	Components.Delete("CLEAT 600")
	
	CLEAT_SPC = 450
	CLEAT_NO = Ceil((WW_LG - 300) / CLEAT_SPC)	
	
	Dim CLEAT_600 = Components.Add("CLEAT 600", "GW340.iam")
	Constraints.AddFlush("C BASE", "CLEAT 600", "BASE", "SW01 MESH", "MESH TOP")
	Constraints.AddFlush("C MID", "CLEAT 600", "CTR", "SW01 MESH", "MESH CTR")
	Constraints.AddMate("C EDGE", "CLEAT 600", "MID", "SW01 MESH", "MESH START", offset := - (CLEAT_SPC / 2))
		
	Dim CLEAT_Pattern = Patterns.AddRectangular("CLEAT Pattern", "CLEAT 600", CLEAT_NO, CLEAT_SPC, "SW01 MESH", "Z Axis", columnNaturalDirection := False, rowCount := 1, rowOffset := 1.0 in, rowEntityName := "Y Axis", rowNaturalDirection := False)
		
Case 14.9 To 17.9
	
	Patterns.Delete("CLEAT Pattern")
	Components.Delete("CLEAT 600")
	
	CLEAT_SPC = 400
	CLEAT_NO = Ceil((WW_LG - 300) / CLEAT_SPC)
	
	Dim CLEAT_600 = Components.Add("CLEAT 600", "GW340.iam")
	Constraints.AddFlush("C BASE", "CLEAT 600", "BASE", "SW01 MESH", "MESH TOP")
	Constraints.AddFlush("C MID", "CLEAT 600", "CTR", "SW01 MESH", "MESH CTR")
	Constraints.AddMate("C EDGE", "CLEAT 600", "MID", "SW01 MESH", "MESH START", offset := - (CLEAT_SPC / 2))
	
	Dim CLEAT_Pattern = Patterns.AddRectangular("CLEAT Pattern", "CLEAT 600", CLEAT_NO, CLEAT_SPC, "SW01 MESH", "Z Axis", columnNaturalDirection := False, rowCount := 1, rowOffset := 1.0 in, rowEntityName := "Y Axis", rowNaturalDirection := False)
	
Case >= 18
	
	Patterns.Delete("CLEAT Pattern")
	Components.Delete("CLEAT 600")
	
	CLEAT_SPC = 350
	CLEAT_NO = Ceil((WW_LG - 300) / CLEAT_SPC)
	
	Dim CLEAT_600 = Components.Add("CLEAT 600", "GW340.iam")
	Constraints.AddFlush("C BASE", "CLEAT 600", "BASE", "SW01 MESH", "MESH TOP")
	Constraints.AddFlush("C MID", "CLEAT 600", "CTR", "SW01 MESH", "MESH CTR")
	Constraints.AddMate("C EDGE", "CLEAT 600", "MID", "SW01 MESH", "MESH START", offset := - (CLEAT_SPC / 2))
	
	Dim CLEAT_Pattern = Patterns.AddRectangular("CLEAT Pattern", "CLEAT 600", CLEAT_NO, CLEAT_SPC, "SW01 MESH", "Z Axis", columnNaturalDirection := False, rowCount := 1, rowOffset := 1.0 in, rowEntityName := "Y Axis", rowNaturalDirection := False)
	
End Select

I thought I would have been able to simply adjust the spacing after the pattern was created.

Perhaps I am not properly understanding the way iLogic works?

0 Likes