Calculate a value from one or the other depending on the changed parameter

gert-leonvanlier
Collaborator

Calculate a value from one or the other depending on the changed parameter

gert-leonvanlier
Collaborator
Collaborator

Is it possble to calcalute a parameter from another parameter and vice versa? S one parameter is changed, the other adapts.

 

For example I have

ConnectorHeightIn = HeightIn - 44

HeightIn = ConnectorHeightIn + 44

At this point I can not calculate HeightIn from ConnectorHeightIn.  The calculation has to work both ways.

0 Likes
Reply
Accepted solutions (1)
579 Views
6 Replies
Replies (6)

bradeneuropeArthur
Mentor
Mentor

With VBA; Vb.net or Ilogic?

Regards,

Arthur Knoors

Autodesk Affiliations:

Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:Drawing List!|Toggle Drawing Sheet!|Workplane Resize!|Drawing View Locker!|Multi Sheet to Mono Sheet!|Drawing Weld Symbols!|Drawing View Label Align!|Open From Balloon!|Model State Lock!
Posts and Ideas:Dimension Component!|Partlist Export!|Derive I-properties!|Vault Prompts Via API!|Vault Handbook/Manual!|Drawing Toggle Sheets!|Vault Defer Update!


! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

0 Likes

gert-leonvanlier
Collaborator
Collaborator

Preferably with iLogic, but if that is not possbile the next best/easiest thing.

0 Likes

gert-leonvanlier
Collaborator
Collaborator

Maybe I should at the reason I want this.

 

We are creating assets for the Factory Design Suite. The user should enter HeightIn and HeightOut of asset 1. The user then connects assset 2 to asset 1. In the background ConnectorHeightIn and ConnectorHeightOut are calculated based on the type of asset, angle and so on. Using connectorclasses we synchronize ConnectorHeightOut and ConnectorHeightIn. From there on HeightIn of asset 2 should be calculated.

 

The user should only have to alter HeightIn or HeightOut, ConnectorHeightIn and ConnectorHeightOut are calculated within the asset and will then drive the other parameter.

 

I hope this makes sense.

0 Likes

JelteDeJong
Mentor
Mentor
Accepted solution

you could make 2 iLogic rules.

The first to set 'ConnectorHeightIn':

 

Parameter("ConnectorHeightIn") = HeightIn - 44

The second to set 'HeightIn':

 

 

Parameter("HeightIn") = ConnectorHeightIn + 44

 

 

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

gert-leonvanlier
Collaborator
Collaborator

Great! Thank you very much, that works.

 

Is that because of the two seperate rules or because of adding Parameter(".....")? What is the use of this instead of direct calling the parameter by its name?

0 Likes

JelteDeJong
Mentor
Mentor

The problem is that you cant see wich paramter is updated if you put all calculations in 1 rule. the trick here is that i want to trigger 1 rule only when 1 parameter is updated. if you "get" or "set" a parameter directly it will act as a trigger for that rule. (you can reconise triggers in a rule because the get blue in the code.) Therfore if you "get" 1 parameter directly and "set" the other directly you will have 2 triggers. That is not what i wanted. By setting 1 parameter indirectly ("Parameter(...)") it will not function as a trigger. Then i will have 1 rule with 1 trigger and that is what we needed.

is that clear enough?

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com