Ilogic message box

Ilogic message box

Torben.pedersen
Collaborator Collaborator
2,800 Views
17 Replies
Message 1 of 18

Ilogic message box

Torben.pedersen
Collaborator
Collaborator

hallo Inventor users

 

I hope you can help me, whit an Ilogic rule.

I want to trigger an Message box when the following happens:

 

if parameter("Hight")-Parameter("Hole depth")>=1.5 mm then

MassageBox.Show("to littet material in bottum of hole", "Warning hole punched thru")

 

End if

 

but I can´t seem to figure it out my self. Do I need a event trigger? I just can´t see how the event trigger can see the Hight-depth

 

Plz help me, I´m new to Ilogic, and I wuold really like to get the hang of it 🙂

 

I would like to say thanks in advance, and sorry if my english is hard to understand it´s my 2nd language.

 

-Mads Refsgaard

I hope this was helpfull.
Did I answer your question please accept this as solution.

if you liked my answer feel free to give me a Kudo 🙂
0 Likes
Accepted solutions (1)
2,801 Views
17 Replies
Replies (17)
Message 2 of 18

Thomas_Savage
Advisor
Advisor

Hello,

 

Could attach your part Please?

 

Thomas



Thomas Savage

Design Engineer


Message 3 of 18

Torben.pedersen
Collaborator
Collaborator

Yeah sure, but the names of The parameters, is intern language (german)

 

Hight=Höhe

Hole depth=BT

I hope this was helpfull.
Did I answer your question please accept this as solution.

if you liked my answer feel free to give me a Kudo 🙂
0 Likes
Message 4 of 18

Thomas_Savage
Advisor
Advisor

Hello,

 

When do you want the message box to show up?

 

When the hole depth is 1.5mm?

 

From your first message I don't really understand.

 

Because you have height and hole depth.

 

Thomas. 



Thomas Savage

Design Engineer


Message 5 of 18

Torben.pedersen
Collaborator
Collaborator

if Hight - hole depth is under 1,5 mm 

 

example:

 

Hight = 15 mm

Hole depth = 14 mm

 

15-14=1 mm > 1,5 = Messegebox

 

I don´t not if it´s to much to ask, but I have a problem more in Ilogic in the same file

 

if angel=0 deg then

delete face1 = supressed

delete face2 = supressed

 

end if

 

angel is = angel of plane the holes are place on

delete face is = the face that don´t get cut because the holes cut funktion only go down, and that leaves a a face when the angel is not equal to 0 deg

I hope this was helpfull.
Did I answer your question please accept this as solution.

if you liked my answer feel free to give me a Kudo 🙂
0 Likes
Message 6 of 18

Thomas_Savage
Advisor
Advisor

Hello,

 

Yes I seen they was a problem with the other rule.

 

I think I understand now.

 

I will have a go with the first one first.

 

What version of inventor are you using?

 

Thomas



Thomas Savage

Design Engineer


Message 7 of 18

Torben.pedersen
Collaborator
Collaborator

Thanks a lot 🙂

 

the version I´m using is 2016 R2

 

(I know that in inventor 2018 there is a new hole feature were the hole cut backwards asswel)

I hope this was helpfull.
Did I answer your question please accept this as solution.

if you liked my answer feel free to give me a Kudo 🙂
0 Likes
Message 8 of 18

Thomas_Savage
Advisor
Advisor

Hello,

 

I have attached the part file with the first code.

 

On this code I have also done it so when the message box comes up, because the hole depth is to much,

it makes the hole 1.5mm shorter than the height. You will see what I mean when you change the height.

 

I done this so no one could make the hole go through the part.

 

I hope this is what you meant?

 

I also added a form so it is easier to change the sizes.

 

Thomas



Thomas Savage

Design Engineer


Message 9 of 18

Torben.pedersen
Collaborator
Collaborator

Thank you man, it´s really great that you are using your time helping me, I really appreciate that.

 

for the futher rule you have but into the part:

It´s really nice of you, and I know those rules seems logical to make, but I don´t need thoes, only the message box.

the reason for this i, that for standart we only make the holes whit 1,5+ mm but when we are making custom designs, we can push it to the limit.

but I will look at the part and the rules i a bit THANKS! 🙂

I hope this was helpfull.
Did I answer your question please accept this as solution.

if you liked my answer feel free to give me a Kudo 🙂
0 Likes
Message 10 of 18

Thomas_Savage
Advisor
Advisor
Accepted solution

Hello,

 

That's fine.

 

I have done your second rule as well. With the delete face suppressed if angle is 0.

 

Hope this is what you wanted?

 

I have also took the part of the rule out you didn't want.

 

I have attached the part below.

 

Thomas



Thomas Savage

Design Engineer


Message 11 of 18

Torben.pedersen
Collaborator
Collaborator

Thank you very much, I have changged in the Delete face part, I found a mistake, were face 2 did not supress, but now it works.

I´m really greatfull for your help, and it have also made me learn, because I can see how i´ts done.

I can see a lot of places where I can use this in my job, to gain more time, and get less mistakes, but I may just play around whit it to learn it a bit more.

 

Thank you again Thomas, I wish you all the best.

by the way are you from Denmark or any of the notheren Countrys, I think about your name 🙂

 

-Mads Refsgaard

I hope this was helpfull.
Did I answer your question please accept this as solution.

if you liked my answer feel free to give me a Kudo 🙂
0 Likes
Message 12 of 18

Thomas_Savage
Advisor
Advisor

You're welcome.

 

Glad I could help you.

 

Watch YouTube videos, that will help you learn iLogic a bit more.

 

I am from England.

 

Thomas.



Thomas Savage

Design Engineer


Message 13 of 18

Torben.pedersen
Collaborator
Collaborator

Yeah I have watched a great deal of youtube videos, but some times i´t hard to find the one explaining a specefik problem.

 

okay, then I was not far off, whit my guess 🙂

I hope this was helpfull.
Did I answer your question please accept this as solution.

if you liked my answer feel free to give me a Kudo 🙂
0 Likes
Message 14 of 18

Torben.pedersen
Collaborator
Collaborator

hello again, I have now another problem with a rule.

 

describtion of what I want:

I have a plate where I Punche a hole, the hole have a distance from the edge of the plate called b.

the hole have an angel, and the closest point between the edge of the plate and the angeled hole may not be under 1,5 mm

 

I can´t post the file but here I have some pictures that illustrates it, and et the end the rule I have tried to made but does not work.

 

Hole go thou.PNGHole go thou with annotetions.PNGHole go thou Detail.PNG

 

so b-4.61= 10,39 = OK

Min =1,5+4,61=6,11mm

but the rule I have set up does not work see the ruler unter here.

 

SyntaxEditor Code Snippet

If b - (Tan(Angel) * BT + BB / 2) * Cos(Angel) < = 1.5  Then
MessageBox.Show("To little material in Seite of Plate and hole whit angel", "Warning hole punched through")
End If

 

futher informations: I don´t get any errors but the massage box does not show up then tere is under 1,5 mm ( minimum distance = 4,61 + 1,5 mm = 6,11) the massege shos at  b = ~5,2 and less so at ~0,5 mm to the edge. 

I hope this was helpfull.
Did I answer your question please accept this as solution.

if you liked my answer feel free to give me a Kudo 🙂
0 Likes
Message 15 of 18

Torben.pedersen
Collaborator
Collaborator

I have 1 more question so here goes.

 

Is it possible to make a Ilogic form in a assembly with´s change the part / more then 1 part?
I can link the parameters from the parts to inside of the assembly, I can also make the form, but the change box is gray not not Editable.

se examble unter:
here is a picture of a example on a form.Form.PNG

I hope this was helpfull.
Did I answer your question please accept this as solution.

if you liked my answer feel free to give me a Kudo 🙂
0 Likes
Message 16 of 18

Thomas_Savage
Advisor
Advisor

Hello,

 

Do you mean swap an iPart for another iPart?

 

Which you can do in assembly using iLogic.

 

Thomas



Thomas Savage

Design Engineer


0 Likes
Message 17 of 18

Torben.pedersen
Collaborator
Collaborator

no I mean I have a part that can change height length and with, this part is assembled with another part that can do the same.

then I want to be able to change those parameters from in side the assembly.

 

do you understadn or do? English is not my first language.

I hope this was helpfull.
Did I answer your question please accept this as solution.

if you liked my answer feel free to give me a Kudo 🙂
0 Likes
Message 18 of 18

Thomas_Savage
Advisor
Advisor

Hello,

 

Yes I understand now. 

 

Maybe it is greyed out because changing one parameter will automatically change the other on a part.

 

I do this with Height. When I change a drawer height on a cabinet it changes the height of the cabinet.

 

Could you attach your part?

 

Thomas



Thomas Savage

Design Engineer


0 Likes