Equations in parameters

Anonymous

Equations in parameters

Anonymous
Not applicable

In the help menu in shows an example of "width^2", why won't this work? Do you really need to isolate the width parameter to change it to a ul just to square it and if so how to you get it back to the original unit so you can use it in a dimension?

0 Likes
Reply
Accepted solutions (1)
4,065 Views
15 Replies
Replies (15)

kennyj
Collaborator
Collaborator

Hello and welcome to the forums!

 

What version of Inventor are you using?

 

In the parameters, you need to have a Width parameter before you can build the equation.

 

Then, in another parameter (either user defined or an existing parameter/dimension field) you can then enter Width (and whatever equation you want to do to this existing parameter).

 

Hope this helps!

 

Kenny

 

0 Likes

Curtis_Waguespack
Consultant
Consultant

Hi bryan.irey,

 

Try something like this screen capture.

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

 

 

Area.PNG

EESignature

0 Likes

Anonymous
Not applicable
I understand that the width parameter already exists, and if I create a new parameter and type the equation width^2 I get an error because it's trying to square the units before the number.
0 Likes

JDMather
Consultant
Consultant
When I took HS math back in the last century we were always admonished to properly cancel out units. This was reinforced in college math.
Knowing how to handle units in an equation has proved to be a useful skill to master in Inventor and SolidWols.

-----------------------------------------------------------------------------------------
Autodesk Inventor 2019 Certified Professional
Autodesk AutoCAD 2013 Certified Professional
Certified SolidWorks Professional


0 Likes

johnsonshiue
Community Manager
Community Manager
Accepted solution

Hi Bryan,

 

Inventor parameter always has a unit, except the ones you set it to ul explicitly. As a result, when you enter an expression, the unit consistency is important. Width square means the length unit square. You will need to isolate the value or the given parameter has to be based on length unit square.

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer

amaysHQVPF
Participant
Participant

While the parameters may be based on mathematically-correct concepts, Inventor's interface and syntax is extremely clunky. 

 

Coming from Creo, there is a severe reduction in flexibility and ease of input when manipulating the equations and the units involved.  For one, Creo has a dedicated notepad-like editor for equations which makes the whole process easier.  Second, it doesn't require additional modifiers in-line with the equation in order to track units.  This cleans up the equation making it easier to create and parse.

 

If you haven't already, I would highly suggest benchmarking the parameter/relation functionality in Creo (and SolidWorks, for that matter).  When done well, parametric capability can make as big of a positive impact on design productivity as the jump from 2D to 3D.

 

Edit:  I realize that iLogic rules provide something similar, but they also seem to add a layer of complexity beyond what Creo requires to accomplish the same result.

0 Likes

johnsonshiue
Community Manager
Community Manager

Hi! I think I know what you are talking about. It is about the equation parser in Inventor. It is true that the equation or the expression in Inventor is unit-sensitive. Unless the units are in sync, the equation can lead to confusing results. There is room for improvement for sure. I will work with the project team and see how we can improve further.

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes

wally.slater
Participant
Participant

I have successfully linked a length, height and width column from my part to my parts list.

But what I would really like to do, is have the length, height and width show up in 1 column, (size), in my parts list.

Is this possible and can you help me with it.

Thank you in advance.

0 Likes

johnsonshiue
Community Manager
Community Manager

Hi! This can be done. You will need to create a new custom iProperty or reuse an existing iProperty. Let's say you have "LENGTH", "WIDTH", and "HEIGHT" as custom iProperties. You can use "STOCK NUMBER" to aggregate them like this expression.

 

=<LENGTH>, <WIDTH>, <HEIGHT>

 

The values will be populated to "STOCK NUMBER" automatically. You can do this in the BOM table also.

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer

wally.slater
Participant
Participant

Thank you for your reply.

Please tell me what I am doing wrong.

Thank you in advance

INVENTOR - PART PARAMETERS ATTACHED TO PARTS LIST .png

0 Likes

johnsonshiue
Community Manager
Community Manager

Hi Wally,

 

I guess you misunderstood the solution. The parameters table is where you input or obtain the parameters values. Yo aggregate these values, you need to do it in iProperties dialog.

For your case, you need to create a custom iProperty called "Size" and then type in the expression. "Size" will show the length, width, and height respectively.

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes

wally.slater
Participant
Participant

Sorry, this is new for me.

Originally I opened the parameter's window in the part, I changed the "d" parameter names to LENGTH , HEIGHT & WIDTH.

 I was able to get the LENGTH , HEIGHT & WIDTH linked from iProperties, parameter's and parts list, that all worked fine, but hey were already there, I just changed the names.

 

The only way I know how to create a new iProperty is by adding a user parameter.

I have created a parameter / iProperty called SIZE , it shows up in my parameter's widow and iProperties window.

I have also added a SIZE column to my parts list.

The equation tab in my SIZE parameter defaults to 1.0 in. It will not allow me to put in the equation you gave me.

Any help you can give me would be greatly appreciated, thank you for your patients.

 

wallyslater_0-1627930705069.png

 

 

when i put the SIZE 

i just  dont know what equation to put in 

 

0 Likes

johnsonshiue
Community Manager
Community Manager

Hi! You cannot reuse "SIZE" in the iProperty, since it is driven by an exported parameter already. What you need to do is to create another size. Or simply unexport the parameter "SIZE." Then create a custom iProperty representing the size (same name can be used as long as parameter "SIZE" is not exported).

Then simply enter the following expression and hit <Enter> in iProperty dialog

 

=<LENGTH>, <WIDTH>, and <HEIGHT>

 

It should work. If not, please share the file here.

Many thanks!

 

 



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes

wally.slater
Participant
Participant

Thank you very much.

You were able to make even an idiot like me be able to do this😎.

I appreciate you time and patients.

0 Likes

johnsonshiue
Community Manager
Community Manager

Hi Wally,

 

You did not do anything wrong. It is just that Inventor has too many workflows. Sometimes it may not be as straight forward to figure it out as it should.

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer