Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Ilogic and Sheetmetal Gauge ...

3 REPLIES 3
Reply
Message 1 of 4
mdavis22569
801 Views, 3 Replies

Ilogic and Sheetmetal Gauge ...

So I'm starting to play with Ilogic ..and have no idea where to start.. What I'm trying to do is: I have a part that is .135" thick, and say 48" X 120" long. In my parameters ..Stock listing it comes in as .135 x 48 x 120 ... I'd like to write an ILOGIC rule that would change it to 10GA.. then the following for other gauges as listed below .120 = 11GA .105 = 12GA .090 = 13GA etc ..etc Suggestions, help? on how to get started? Or has it been done by anyone. Thanks, Mike

Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.

---------
Mike Davis

EESignature

3 REPLIES 3
Message 2 of 4
jletcher
in reply to: mdavis22569

I don't have time to write one and I am not at the client that has that rule if no one helps I will get it and post the part. But most of my clients do this.

 

Sheet Metal.JPG

Message 3 of 4
pball
in reply to: jletcher

I have some code that does that. You might need to tweak it for the thicknesses and stuff but here it is. It's part of a smart sheet metal template I've been working on but we still haven't bothered switching to it for multiple reasons.

 

'Sets sheet thickness parameter for normal sheet and plate
Select Case Parameter("Thickness")
	Case 0.1875
		ShtThk = "7GA"
	Case 0.1640
		ShtThk = "8GA"
	Case 0.1345
		ShtThk = "10GA"
	Case 0.125
		ShtThk = "11GA"
	Case 0.1046
		ShtThk = "12GA"
	Case 0.0747
		ShtThk = "14GA"
	Case 0.0625
		ShtThk = "16GA"
	Case 0.0478
		ShtThk = "18GA"
	Case 0.0359
		ShtThk = "20GA"
	Case 0.0299
		ShtThk = "22GA"
	Case 0.25
		ShtThk = "00.25"
	Case 0.3125
		ShtThk = "00.31"
	Case 0.375
		ShtThk = "00.38"
	Case 0.50
		ShtThk = "00.50"
	Case 0.625
		ShtThk = "00.63"
	Case 0.75
		ShtThk = "00.75"
	Case 0.875
		ShtThk = "00.88"
	Case 1.00
		ShtThk = "01.00"
 	Case Else
	 	ShtThk = "??"
End Select
	
'Creates the custom iproperty ShetThk and sets it
iProperties.Value("Custom", "ShtThk") = ShtThk

If (Not ThisDoc.Document.ComponentDefinition.FlatPattern Is Nothing) Then 
	'These lines set the length and width of the flat pattern to custom iproperties and rounds them to 2 decimal places
	iProperties.Value("Custom", "Length") = FormatNumber(Iif(SheetMetal.FlatExtentsLength > SheetMetal.FlatExtentsWidth, SheetMetal.FlatExtentsLength , SheetMetal.FlatExtentsWidth ),2)
	iProperties.Value("Custom", "Width") = FormatNumber(Iif(SheetMetal.FlatExtentsLength > SheetMetal.FlatExtentsWidth, SheetMetal.FlatExtentsWidth , SheetMetal.FlatExtentsLength ),2)
End If

 

I even included a bonus that gets the flat patter size and rounds them to 2 decimal places. Just put something like this in the description or whatever iproperty field you use.

 

=<ShtThk> X <Width> X <Length>

Message 4 of 4
pcrawley
in reply to: jletcher

I would agree with the above.  Use the Sheet Metal Style to define the "style" and just enter the appropriate parameters in each style.

 

iLogic warning:  iLogic is a very addictive subject - be prepared to give up your evenings and weekends!

 

 

If you really wanted some iLogic to do this, it would probably look like this (untested!!):

(Create a text user parameter called say "Gauge")

 

 

Select Case Thickness 'This gets the Sheet metal parameter called "Thickness"ready for some testing...

 

    Case = 0.12 'This is saying "if thickness = 0.12 then do whatever comes next until you hit the next "Case" statement.
         Gauge = "11GA" 'Sets Gauge = the right text for your parts list.

 

    Case = 0.105 'And repeat for the next gauge.
         Gauge = "12GA"

       

         'I'm sure you can spot the pattern for any more 🙂

 

End Select 'Finishes the Select Case statement, and since there is nothing after this line, the code ends.

 

Peter

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report