Adding Equation and Link Parameter from Equation using API

Adding Equation and Link Parameter from Equation using API

Anonymous
Not applicable
469 Views
1 Reply
Message 1 of 2

Adding Equation and Link Parameter from Equation using API

Anonymous
Not applicable

Hi everyone,

 

I have two images, one is from Solidworks and another from Inventor.

My question is, Is it possible to add the equation as that of Solidworks(circled in red) in Inventor so that we can link the parameters from Inventor Equation.

Does Inventor has this application or not?

If we can add then how can we do it please suggest me.

 

Regardsキャプチャ.PNG

0 Likes
470 Views
1 Reply
Reply (1)
Message 2 of 2

Owner2229
Advisor
Advisor

Hi, In Inventor, (aka in the window wou posted screenshot of) you see the parameter's names. Just type this name in the parameter instead of value.

E.g.: You have there these parameters:

d19    12 mm

d23    15 mm

 

Now if you'd want the parameter d23 to mach the d19 you'll type d19 this in the d23 parameter's value field.

If you want to do some operations with the value, then simpy type it next to it, e.g:

d19 / 2

Abs(d19)

 

Here you can see an example with d0 linked to OD:

 

 

You can't however type in the "If Then Else" statement, you have to make a rule for it.

In Inventor (in open part or assy) go to "Manage" > "Add Rule" and type in this:

 

' This will execute this rule every time the parameter d19 changes:
s = d19

' Now the equasion itself:
If d19 = 12 Then
     d23 = 15
Else
     d23 = d19 / 2
End If

 

Just remember that in Inventor, there are the parameter names globaly shared, so you wont find anything twice (e.g. d1).

When you start new sketch, it wont start with d0, but with the last unused parameter number (e.g. d49). 

Consider using "Accept as Solution" / "Kudos" if you find this helpful.
- - - - - - - - - - - - - - -
Regards,
Mike

"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - John F. Woods
0 Likes