<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=1053641198063307&amp;ev=PageView&amp;noscript=1">
  • Blog
  • Using Parameters in your iProperties Part II
Blog-Inventor-byTeamD3-3

Continuing from last weeks topic, this week we want to look at using the flat pattern extents from a sheet metal part in our iProperties. For this scenario we want to be able to put the extents in our Stock Number iProperty to be able to show what size of blank material we will need for our sheet metal part.

With a sheet metal part, once we have a flat pattern, if you right click on the flat pattern you can select Extents and it will show you the width, length and area. Unfortunately, those values don’t show up as parameters that we can use like we discussed last week.

 

 

Flat Pattern Extents

The trick to get this to work for us is going to take using ilogic. Now don’t panic if you haven’t used ilogic before, as this situation is fairly simple and straightforward, and will demonstrate that you don’t need to be a programmer to use it. All we need to do is create a rule that will set the sheet metal extents to parameters.

In the Manage Tab there is an iLogic Panel that we can click on Add Rule to start our rule.

 

 

Add Rule

We’ll name it Sheet Metal Extents for this one.

 

 

Rule Name

In your Rule, on the left side will be a bunch of Snippets. (saved ilogic code that you can use)There is a Sheet Metal section that lists two snippets we want to use, FlatExtentsLength and FlatExtentsWidth. To use them we’ll just double click on them to add them to our rule. Make sure they are on separate lines.

 

 

iLogic Rule

In this rule, it is saying the variable called extents_length will be equal to the flat pattern length and same concept for the width. Now by default extents_length is not a parameter, it is only residing in the ilogic rule, but if we create a user parameter named extents_length, then it will put the value in there. So, all we need to do is hit Save and then Close, then open our parameters and create two user parameters, extents_length and extents_width.

***important reminder: make sure you’re not active in the flat pattern when you click parameters, or it will only add the parameters to the flat pattern and not the model and will not work***

 

 

Adding Parameters

Now let’s edit our rule to notice one slight, but important change. To edit, you’ll want to turn on your iLogic browser (Manage Tab – iLogic Browser) In the Rule tab, just right click and edit our rule.

 

 

iLogic Browser/Edit Rule

 

 

Updated iLogic Rule

Notice the text for extents_length and extents_width turned blue. This is visual confirmation that those internal variables have converted into our user parameters. If they are not blue, then make sure they are spelled correctly (case sensitive). Click Save & Run to execute the rule and note the results.

 

 

Values Updated

If you open the parameters, those values will be updated and now we can use them in our iproperties like we discussed last week.

 

C:\Users\DAN~1.HUN\AppData\Local\Temp\SNAGHTML72ff3a6.PNG

 

Parameter Equation

There is one more step to make sure these will update if the part should change, we need to set up a trigger for that rule to know when to run. Launch the Event Triggers (Manage Tab – iLogic Panel) then drag the Sheet Metal Extents from the left on to the Before Save Document. This tells Inventor to run this rule before it saves.

 

 

Event Trigger

 

 

Event Trigger

The reason I set this rule to run before save is because if I make changes to the part, I’ll want to save those changes which will ensure that the parameters will remain up-to-date. You can of course set the rule to run with other triggers, just be sure to do plenty of testing to ensure the rule executes only when you want it to. Side note…..if you are using vault, DO NOT set any rules that affect files to After Save document, this will put your file in a vicious cycle of never clean to check in to vault.

I hope this has helped and appreciate you reading this, so if you have any comments, questions or even ideas for additional topics, please leave them below. - Dan Hunsucker

 

Do you use any of these tips and tricks in your daily workflow? Feel free to brag about your success in the comments!

Like what you’ve read? Subscribe to our blog! 

 Feel free to share on Twitter or Facebook!

Looking for Affordable Training?

Stay Competitive with the flexibility to take any scheduled D3 courses as often as you need.

Learn about an Evolve360 Training subscription.