iLogic - pop a message whenever specific parameter change in a part

iLogic - pop a message whenever specific parameter change in a part

danielhibner55
Enthusiast Enthusiast
393 Views
3 Replies
Message 1 of 4

iLogic - pop a message whenever specific parameter change in a part

danielhibner55
Enthusiast
Enthusiast

Hello,

I have an assembly of frames built on a basis of a rectangular skeleton. This skeleton is a part of rectangular sketch which have a length and height, the length is set to a parameter called "Length". I am a newbie in iLogic, meaning that I barely know coding in it. My goal is that whenever the "Lengh" is change (in the part or via edit part in the assembly) a massage pop saying something (here, since the length determine something critical in the bottom frame, I want message that say "Pay attention to the bottom frame due to length change!").

I would really appreciate any help, thank you very much!

0 Likes
Accepted solutions (1)
394 Views
3 Replies
Replies (3)
Message 2 of 4

andrewiv
Mentor
Mentor

This can be very simple if you want it to be.  Just add a rule to the part similar to this.

'Name of the parameter that will trigger the rule
LENGTH

MessageBox.Show("This is the message to be shown.")

Andrew In’t Veld
Designer / CAD Administrator

Message 3 of 4

danielhibner55
Enthusiast
Enthusiast
Accepted solution

thank you! its not working:

danielhibner55_1-1762955588979.png


when I try it this way:

danielhibner55_2-1762955621955.png


its is working but the message title is what I wrote in the text and the message content is the value of the parameter "Length", like this:

danielhibner55_3-1762955698136.png


and I want the title to be "Attention", the content to be "Hello", and not showing the Length value at all. its will be nice to add bottum like "yes" and "no" as well.



0 Likes
Message 4 of 4

Curtis_Waguespack
Consultant
Consultant

@danielhibner55 wrote:

and I want the title to be "Attention", the content to be "Hello", and not showing the Length value at all. its will be nice to add bottom like "yes" and "no" as well.


@danielhibner55 , here is a quick example that shows how to add and use Yes/No buttons. Hope that helps, Curtis

 

MessageInput = MessageBox.Show("Did you pay attention to the bottom frame due to length change!", "iLogic",
MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2)

If MessageInput = vbCancel Then
	Exit Sub ' exit the rule
ElseIf MessageInput = vbNo Then
	'do somthing
	MessageBox.Show("Well, you now you know! " & ChrW(&H263A), "you clicked " & MessageInput.ToString)
		Exit Sub ' exit the rule
'ElseIf MessageInput = vbYes Then
'	'do something else, or do nothing and continue rule
End If

MessageBox.Show("Thanks for paying attention! 👍 ", "you clicked " & MessageInput.ToString)
0 Likes