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

iLogic Rule is not populating custom Parameters

I have a rule that I am trying to manipulate around the randomness of the flat pattern, My other post here

 

I have added 2 place holder parameters called TEMP_EXTENTS_LENGTH and TEMP_EXTENTS_WIDTH, these are populated from the snippets in the sheetmetal area. 

 

I created a simple greater than less than rule to give me a result so the the longer edge would then populate the custom parameter EXTENTS_LENGTH and the shorter edge would populate the EXTENTS_WIDTH parameter. This seems like a lot of extra work but if you read the linked post, for some reason the flat pattern changes when altering the part and I want my parts lists to display the longest edge as length.

 

Here is the code, there are no errors, however there are no results or changes, the EXTENTS_LENGTHS and EXTENTS_WIDTHS parameters remain unchanged. 

 

TEMP_EXTENTS_LENGTH = SheetMetal.FlatExtentsLength
TEMP_EXTENTS_WIDTH = SheetMetal.FlatExtentsWidth

x = TEMP_EXTENTS_LENGTH
y = TEMP_EXTENTS_WIDTH


If x > y Then 

EXTENTS_LENGTH = SheetMetal.FlatExtentsLength &  EXTENTS_WIDTH = SheetMetal.FlatExtentsWidth 

ElseIf x < y Then 

EXTENTS_LENGTH = SheetMetal.FlatExtentsWidth  &  EXTENTS_WIDTH = SheetMetal.FlatExtentsLength 

End If
Sean Farr
Product Designer at Teksign Inc.
Inventor 2016 SP1
Dell Precision 3660
i7-12700 @ 2.40GHz-4.90GHz
32GB DDR5 4400MHz RAM
NIVDIA RTX A2000 6GB
WCrihfield
in reply to: Shag_Bore

Hi @Shag_Bore.  Your code appears to be formatted incorrectly.  You only use the '&' symbol for piecing together sections of a String, not for consecutively setting values to numerical values.

This is how it should be formatted.

TEMP_EXTENTS_LENGTH = SheetMetal.FlatExtentsLength
TEMP_EXTENTS_WIDTH = SheetMetal.FlatExtentsWidth

x = TEMP_EXTENTS_LENGTH
y = TEMP_EXTENTS_WIDTH

If x > y Then 
	EXTENTS_LENGTH = SheetMetal.FlatExtentsLength
	EXTENTS_WIDTH = SheetMetal.FlatExtentsWidth 
ElseIf x < y Then 
	EXTENTS_LENGTH = SheetMetal.FlatExtentsWidth
	EXTENTS_WIDTH = SheetMetal.FlatExtentsLength 
End If

Wesley Crihfield

EESignature

(Not an Autodesk Employee)