Novice iLogic Question: Walk-through Programming Example

Novice iLogic Question: Walk-through Programming Example

cadman777
Advisor Advisor
462 Views
6 Replies
Message 1 of 7

Novice iLogic Question: Walk-through Programming Example

cadman777
Advisor
Advisor

Can someone please direct me to a video that shows someone writing a program using iLogic and some VBA, and doing it INSIDE INVENTOR? I realize this request sounds infantile, but bear with me. I want to see exactly what references they look at to find the information they use in the program.

 

After 3 full weeks of pulling my hair out, I've been able to identify at least the following bodies of reference material needed to write programs for iLogic:

1. Inventor OBJECTS

2. iLogic syntax

3. Inventor part/assembly/drawing Parameters and iProperties

4. VBA commands (syntax and all that stuff)

5. How to use the VB Studio program

6. WORK-FLOW (the biggest UNKNOWN for me!).

 

What do I mean by WORK-FLOW?

Work-flow is HOW you ACCOMPLISH something with your program. It's the compilation of PROCESSES you MUST use to in your program. I ask myself: What processes do I need to changing a setting in Inventor, or add a Parameter or iProperty to a part file while inside a drawing file, or how do I save files to a specific direction with a specific name based on part metadata, etc.? That's what I'm talking about.

 

I noticed that everything I want to accomplish requires a mega number of processes cobbled together. It's like when I salvage a hack job on my neighbor's vehicle. I have to use various mechanic's techniques I've learned over the past many years to undo the work he did, and redo the work that needs to be done the right way, which in the process, there's things he broke that I need special skills to fix (tricks of the trade). So there's a number of mechanic's PROCESSES that have to be cobbled together to get the job done. SAME WITH PROGRAMMING. But I have no idea what those PROCESSES are, nor how to COMBINE them (connect them together). That's the BIGGEST UNKNOWN for me at this point, besides knowing how to access the reference material I need, and have it readily available at my fingertips to look up stuff when I need it (b/c I can't possibly memorize all the words and phrases in iLogic and VBA). 

 

Are you getting me?

 

I watched a number of videos, but they just show you what they're typing, but not where they got they info from.

 

For example: When I was a kid, my dad taught me how to cut wood using a coping saw. We made a cutting board for my mom. He showed me what the saw frame was, what the blade was and where to get both, how to install the blade and tension it, how to hold the saw, how to secure the wood piece, how to mark the wood with a profile, and how to cut the wood along the profile.

 

The way programmers show the videos I've watched is equivalent to my dad showing me where the saw is and telling me to watch him cut the pattern. Let me quote Tony here: "WTF??"

 

Get my point?
Where can I find a video where someone creates a simple iLogic program that requires SOME VBA knowledge, and does it step by step showing how to access the resources to find the info you need when you DO NOT KNOW the commands and words and other relevant info.

 

I'm using IV2010.

 

Thanx ...

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator
0 Likes
463 Views
6 Replies
Replies (6)
Message 2 of 7

CamperUnhappy
Advocate
Advocate

My first suggestion to you would be to fire up the embedded VBA console and start doing a little work and digging in there.  It sounds like you need to do a little reading on Object-Oriented-Programming in order to help understand how and where to get and manipulate the items you're looking for.

 

I pretty much abandoned iLogic shortly after learning how to code because there is currently (at time of writing this) no easy way to debug iLogic code.  So if you have a fairly complete operation, iLogic is quick to help you get the code written, but you're basically in the dark with stepping through it and trying to debug.

 

I honestly think that the VBA interface is a better place to learn through because it allows you to step through objects and explorer them AS you code.  Sure VBA is a lot clunkier and more verbose than VB.net or iLogic, but what you gain (in the beginning at least) is worth it.

 

Also, if you haven't found these invaluable references yet.......    check them out:
C:\Users\Public\Documents\Autodesk\Inventor 20XX\SDK\DeveloperTools\Docs\InventorObjectModel.pdf

C:\Users\Public\Documents\Autodesk\Inventor 20XX\Local Help\admapi_XX_X.chm

 

(obviously the X's vary with what version you're working with)

edit:

Also I wanted to mention that the site Being Inventive is an amazing resource for learning and following along with iLogic, VBA, and .NET.

0 Likes
Message 3 of 7

cadman777
Advisor
Advisor

OK, Camper, thanx for the advice.

That's what I figured: I gotta to learn VBA.

Just what I didn't want to hear!

Anyways ...

Yes, I've used the Object Model chart a number of times.

Then I went to the API Help and found the objects, methods, properties, etc. (talk about a ant farm!)

But now it's painfully obvious that VB CODING is what I need to learn.

I just HATE the idea of learning a bunch of IRRELEVANT coding when I don't have to.
That's one of the things I absolutely HATED about public school and university.

All that did was burn me out and sour me to institutionalized education.

What I want is to learn coding with Inventor that's relevant to my needs.

If wishes were ...

Thanx!

 

PS: Can't find "admapi_XX_X.chm" in any of the IV2010 directories (searched "admapi" and nothing came up).

But there is an "SDK" folder and API Help in IV2010 Help (which I've been whittling away at when I need to fall asleep!).

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator
0 Likes
Message 4 of 7

CamperUnhappy
Advocate
Advocate

I kind of get why you're hating on VBA, but I have news for you......iLogic is basically VB.Net with a couple of shortcuts built it.   VB.Net is basically just a much smoother version of VBA.

 

So anyway way you slice it, you're learning some sort of Visual Basic.

 

If you really didn't want to bother with VB, you could always try to write your own add-in with C# which is a MUCH more relevant and useful language, but that's a lot to take on if you don't even have the basics of VBA/VB.  There is also very little help material out there for C#.

0 Likes
Message 5 of 7

cadman777
Advisor
Advisor

OK Camper, I guess I'm being funneled into VB.

Reminds me of going to court:
You either step-up or you get ground-up!

Do I get a badge when I complete my lessons?
"Mechanic Defected to Programmer" ... LOL!

 

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator
0 Likes
Message 6 of 7

philip1009
Advisor
Advisor

Unfortunately that is the way to go for automating Inventor unless the snippets are enough to get the job done, for every process you want to automate you have to break it down into the same small steps that Inventor does on it's own in the background when you're doing manual work.  Since you already went through the iLogic help guide, you basically need help with learning Visual Basic.

 

https://www.youtube.com/playlist?list=PLC601DEA22187BBF1

This is the best playlist I've found so far to help teach Visual Basic step by step.  It is using Microsoft Visual Studio, so it's not exactly the same as iLogic, but it's close enough to teach If This Then That, Looping, Case statements, etc.  iLogic can't do everything a full VB program can though, just keep that in mind.  Also keep in mind there are plenty of helpful users to help you write and understand your program step by step.  Depending on the complexity of the program it will take some time but in the long run you'll have learned a very valuable tool, employers definitely take notice when a design process that usually takes an hour is done in 10-15 minutes.

0 Likes
Message 7 of 7

cadman777
Advisor
Advisor

OK.

Thanx for he resource.

I'll get right on it and see where it takes me.

The Internet is an amazing source of info ... if only you know which info is good and which info is junk.

That's the challenge, which is why good advice is worth its weight in gold.

... Chris
Win 7 Pro 64 bit + IV 2010 Suite
ASUS X79 Deluxe
Intel i7 3820 4.4 O/C
64 Gig ADATA RAM
Nvidia Quadro M5000 8 Gig
3d Connexion Space Navigator
0 Likes