Updating Form Fields When Button Clicked

Updating Form Fields When Button Clicked

Chirpyboy2060647
Advocate Advocate
496 Views
2 Replies
Message 1 of 3

Updating Form Fields When Button Clicked

Chirpyboy2060647
Advocate
Advocate

Hello all,

 

So finally at a place that is using Inventor for woodworking and such and im learning pretty quickly how to create forms and rules and i love it. Having issues tho and its probably simple. Im making a simple wood counter, and having an option of removing the toe kick if you want or adding it if its needed. Got all that working just fine. 

 

SyntaxEditor Code Snippet

If ToeKickVisible = True 'This is asking if you want a toe kick, then it will show all visible parts
	Parameter("oheight") = Parameter("height") + Parameter("ToeHeight")
iLogicVb.UpdateWhenDone = True
	Feature.IsActive("TKick_Front") = True
	Feature.IsActive("Tkick_left") = True
	Feature.IsActive("Tkick_Rear") = True
	Feature.IsActive("Tkick_Right") = True
	Feature.IsActive("Tkick_Block") = True
	
End If


	If ToeKickVisible = False 'If there isnt a toe kick, then this will hide the parts and adjust the oheight param call out
		Parameter("oheight") = Parameter("height")
		iLogicVb.UpdateWhenDone = True
		Feature.IsActive("TKick_Front") = False
		Feature.IsActive("Tkick_left") = False
		Feature.IsActive("Tkick_Rear") = False
		Feature.IsActive("Tkick_Right") = False
		Feature.IsActive("Tkick_Block") = False

		
End If

For the code. I attached a picture of my form as well. There is a field grayed out (intentional) so that if theres a toe kick, it will make sure you are at the height you want to be. Problem is, the oheight form only ever updates after pressing my Toe Kick Button...I know theres an update line i need to add just dont know where to start looking for that..or maybe im looking down wrong path.

 

Thanks!

 

0 Likes
497 Views
2 Replies
Replies (2)
Message 2 of 3

chandra.shekar.g
Autodesk Support
Autodesk Support

@Chirpyboy2060647,

 

Hoping that below iLogic may help to update. Can you please share sample part file(with iLogic form) to test? please make sure that files are non confidential.

 

 

If ToeKickVisible = True 'This is asking if you want a toe kick, then it will show all visible parts
	Parameter("oheight") = Parameter("height") + Parameter("ToeHeight")

	Feature.IsActive("TKick_Front") = True
	Feature.IsActive("Tkick_left") = True
	Feature.IsActive("Tkick_Rear") = True
	Feature.IsActive("Tkick_Right") = True
	Feature.IsActive("Tkick_Block") = True
iLogicVb.UpdateWhenDone = True InventorVb.DocumentUpdate() End If If ToeKickVisible = False 'If there isnt a toe kick, then this will hide the parts and adjust the oheight param call out Parameter("oheight") = Parameter("height") Feature.IsActive("TKick_Front") = False Feature.IsActive("Tkick_left") = False Feature.IsActive("Tkick_Rear") = False Feature.IsActive("Tkick_Right") = False Feature.IsActive("Tkick_Block") = False iLogicVb.UpdateWhenDone = True InventorVb.DocumentUpdate() End If

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 3 of 3

Chirpyboy2060647
Advocate
Advocate

Sorry for the really late response. Had a death in the family and was away from work for a while...Unfortunately i dont think i can as these are work files im making. I could remake at home and send a copy. Let me test your code and let you know if it works. 

0 Likes