Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Understanding VBA Structure

5 REPLIES 5
Reply
Message 1 of 6
Anonymous
385 Views, 5 Replies

Understanding VBA Structure

Ok,

I have posted before that I am new to Inventor and VBA programing. I have managed to cut and past together (with all of your help) a VBA application that quite suprisingly to me works. Now that I have hacked it together, I have decided to go back and take a closer look at what it is that I actually did... I believe I understand how code is accomplished and executed, but what I am struggling with is a basic understanding of the flow of the code. For example, I have found (thru my reading and research) a IV8 flow chart (For VBA), and I discovered the watch command. Trying to utilize these they do not seem to follow the flow the code requires to successfully run. Could someone point me in the right direction. I feel like I am just missing that one thing to understanding it,almost to the point the proverbial light bulb will go off over my head. I would greatly appreciate you advanced users input and suggestions. I strongly believe this is what I need for the company I work for to advance. I have kind of been put in charge of getting IV8 set-up in the way of models for our products, If this is accomplish the company wants to purchase additional seats for other users. I would appreciate your comments/criticisms/suggestions etc.

Thanks in advanced for even reading this book I wrote above
Bill
5 REPLIES 5
Message 2 of 6
Anonymous
in reply to: Anonymous

I hear you and suffer the same. I believe it's all about understanding the application object model. I'm primarily a lisp programmer but have no problem with vb syntax and methods but I do struggle with the application model. Not much help in this for you but perhaps someone can show us what we are missing. Martin Wright "bkline" wrote in message news:15581048.1077379541144.JavaMail.jive@jiveforum1.autodesk.com... Ok, I have posted before that I am new to Inventor and VBA programing. I have managed to cut and past together (with all of your help) a VBA application that quite suprisingly to me works. Now that I have hacked it together, I have decided to go back and take a closer look at what it is that I actually did... I believe I understand how code is accomplished and executed, but what I am struggling with is a basic understanding of the flow of the code. For example, I have found (thru my reading and research) a IV8 flow chart (For VBA), and I discovered the watch command. Trying to utilize these they do not seem to follow the flow the code requires to successfully run. Could someone point me in the right direction. I feel like I am just missing that one thing to understanding it,almost to the point the proverbial light bulb will go off over my head. I would greatly appreciate you advanced users input and suggestions. I strongly believe this is what I need for the company I work for to advance. I have kind of been put in charge of getting IV8 set-up in the way of models for our products, If this is accomplish the company wants to purchase additional seats for other users. I would appreciate your comments/criticisms/suggestions etc. Thanks in advanced for even reading this book I wrote above Bill
Message 3 of 6
Anonymous
in reply to: Anonymous

Lets have some specific VBA questions.
Message 4 of 6
Anonymous
in reply to: Anonymous

Visit the autodesk site and see if this introductory document is of any use to you: http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=1079044 -Thilak "bkline" wrote in message news:15581048.1077379541144.JavaMail.jive@jiveforum1.autodesk.com... Ok, I have posted before that I am new to Inventor and VBA programing. I have managed to cut and past together (with all of your help) a VBA application that quite suprisingly to me works. Now that I have hacked it together, I have decided to go back and take a closer look at what it is that I actually did... I believe I understand how code is accomplished and executed, but what I am struggling with is a basic understanding of the flow of the code. For example, I have found (thru my reading and research) a IV8 flow chart (For VBA), and I discovered the watch command. Trying to utilize these they do not seem to follow the flow the code requires to successfully run. Could someone point me in the right direction. I feel like I am just missing that one thing to understanding it,almost to the point the proverbial light bulb will go off over my head. I would greatly appreciate you advanced users input and suggestions. I strongly believe this is what I need for the company I work for to advance. I have kind of been put in charge of getting IV8 set-up in the way of models for our products, If this is accomplish the company wants to purchase additional seats for other users. I would appreciate your comments/criticisms/suggestions etc. Thanks in advanced for even reading this book I wrote above Bill
Message 5 of 6
Anonymous
in reply to: Anonymous

I have visited and read all of the information on the autodesk site. Although it is helpful I find all of the tutorials go from this is what everything is straight to writing code examples. For example in the beginners guide to the API on pg. 13, first example shows:

Dim oFeature As PartFeature
For Each oFeature in ThisDocument.ComponentDefinition.Features
Debug.Print oFeature.Name
Next

as far as i'm aware of this is setting oFeature As PartFeature, it is then saying for each partfeature in Thisdocuments ComponentDefinition get the Features, show the features (Debug.print) the Features by Name, then go to the Next Feature encountered...

My confusion is with the flow of the code, I used the Autodesk IV8 API object Model flow chart on the web site. if you look at the code and compare it to the flow chart, it really does not coincide. I would look at the flow chart to try and use the Documents collection, PartDocument, PartComponentDefinition, PartFeatures. It seems to me that there are rules and shortcuts for writing your code, It just seem that it is not well documented, because of the most common reason...Those who use it, know it and those who are trying to learn just plain have to figure it out...

Thanks for your response...
Bill
Message 6 of 6
Anonymous
in reply to: Anonymous

Thanks for your response... See my response to Thilak and let me know if I'm making any sense?

Thanks Again.
Bill

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report