Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic rule running with old version of parameters

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
waynehelley
332 Views, 4 Replies

iLogic rule running with old version of parameters

Hi all,

 

I have an iLogic rule which changes the value of the parameter and then triggers another rule to be run. It simply looks like this...

 

Parameter="Value"

iLogicVb.RunRule("MyRule")

 

The problem is that there are functions in the rule which are dependant on the Value of the parameter and at present, the rule seems to run with the old value of the parameter.  Is there anyway to fix this such as adding an update between the two lines of code???...

 

Parameter="Value"

Update

iLogicVb.RunRule("MyRule")

Wayne Helley
Inventor 2013 Certified Professional

Autodesk Inventor Professional 2023
Visual Studio 2022
Windows 10 Pro, 64-bit
Tags (1)
4 REPLIES 4
Message 2 of 5

If parameter = "value" Then

iLogicVb.RunRule("MyRule")

Else 'do nothing

End If

 

Would that not work?

Message 3 of 5

I just tried having my parameter at a random value which was '2'

 

Ran the following...

 

Coordinate_Place=1

If Coordinate_Place=1
iLogicVb.RunRule("Coordinate Place")
Else
End If

 

and the rule still ran with the parameter at a Value of 2  Smiley Frustrated

 

I just noticed there is a function 'RunRule (with map)' which can pass an argument from one rule to another.  Maybe this is what I need to use??

Wayne Helley
Inventor 2013 Certified Professional

Autodesk Inventor Professional 2023
Visual Studio 2022
Windows 10 Pro, 64-bit
Message 4 of 5
waynehelley
in reply to: waynehelley

Solved it...

 

If you alter the parameter using the format...

 

parameter("d0") = 1.2

 

It happens dynamically and the parameter is altered immediately

Wayne Helley
Inventor 2013 Certified Professional

Autodesk Inventor Professional 2023
Visual Studio 2022
Windows 10 Pro, 64-bit
Message 5 of 5
LukeDavenport
in reply to: waynehelley

Hi Wayne,

Alternatively, you can use this line to output (update) the parameters at any point in a rule I believe

Luke

 

 

RuleParametersOutput()

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

Post to forums  

Autodesk Design & Make Report