Where to Start iLogic Problem

Where to Start iLogic Problem

simon4D86F
Enthusiast Enthusiast
418 Views
3 Replies
Message 1 of 4

Where to Start iLogic Problem

simon4D86F
Enthusiast
Enthusiast

Hello All,

 

I am New to iLogic and have been "Playing" with it and have had great fun doing so as well, now I want to start to use it the way it is meant to.  So my first proper little project is simply checking a part and then populating the Custom iProperties..... not so simple as it turns out !!! So here I am, asking for help with the code.

 

What I want to do is......

 

Take an assembly of say no more than 30 parts

(Each part will have named dims: L = Length, W = Width etc)

Some will have a "Cutout" or a "Slot(s)" or a "Hole(s)" etc

Some may have a combination of them all

Now the fun part....

I want to use iLogic to "LOOK AT" each part within the assembly,

"SEE" if it includes any of the above (Cutout, Slot etc)

Then either allow me to enter those details through a form or actually enter the details for me into the specific Custom iProperties.

 

I thought this would be a simple start, but I got lost at the start line due t the language I guess, I know that if I enter "IF X =>50 THEN Y ELSE Z" this makes sens, but I do not know where to start with the "Coding Options" that you have available to you from within the "System and Custom iLogic commands", trying to find a good book on the explanation and usage of these commands so any pointers there would be very helpful as well.

 

Any help with this will be most gratefully received.

 

Many thanks in advance

 

0 Likes
419 Views
3 Replies
Replies (3)
Message 2 of 4

Xun.Zhang
Alumni
Alumni

Hello @simon4D86F,

Post an example here with just <5 components parts with each type of them (cutout, slot, etc) and post the code here, expert can help you to find the reason.

If you are talking about learning path or book for reference, you possibly to start with  iLogic tutorial first and then Inventor iLogic basic.

Hope it helps!


Xun
0 Likes
Message 3 of 4

philip1009
Advisor
Advisor

iLogic is based on a coding language called Visual Basic.  For a code to look at each document used in an assembly, here's a good example:

 

SyntaxEditor Code Snippet

oDocs = ThisDoc.Document.AllReferencedDocuments
For Each oDoc As Document In oDocs
	'Run code here.
Next

Here's a YouTube playlist for learning Visual Basic, it's not exactly the same as what's used in iLogic, but it's still valuable information.

https://www.youtube.com/watch?v=mM3zB3QWuv8&index=1&list=PLC601DEA22187BBF1

 

Keep at it and you'll get it soon enough.

Message 4 of 4

simon4D86F
Enthusiast
Enthusiast

Hello guys,

 

Many thanks for the reply's, sorry it has taken me this long to reply, I work away from home and only get to do this when at home so I hope you can bear with me.

 

I will be trying a few things from what you have said this weekend and will post what I have then so we can go through it in detail.

 

Again, Thanks

0 Likes