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: 

VBA vs .net

8 REPLIES 8
Reply
Message 1 of 9
stefanome
729 Views, 8 Replies

VBA vs .net

I'm starting to develop some customization for Inventor, and I need to decide whether to use VBA, .net, addin, plugin, or what else.

According to this post .net is easier to use than VBA: http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/New-Project-VBA-or-NET-Addin/m-p/22368...

 

I did a quick test and I found out that with VBA is much easier to use than .net: you can edit the source code while debugging, you don't need to compile and install anything, everything seems to work much smoother.

 

Am I missing something?

Do I risk to find out that VBA has problems later in the development?

 

Where can I find documentation with comparison between the different customization techniques?

 

Thanks,

Stefano

Tags (2)
8 REPLIES 8
Message 2 of 9
JohanLarsson
in reply to: stefanome

For small hacks VBA is nice for productivity. For larger products VBA is a weak language, VBA is not meant for nice OO code.

 

One thing that is superior is Visual Studio as code editor.

 

The debugging experience is far better from VBA though, from Studio I only see COM object for most Inventor stuff while in VBA I can browse the hierarchies in a nice way. Maybe I am doing something wrong here?

 

My typical workflow is to write a small proof of concept in VBA and then rewrite it in .Net

-------------------------------------------------------------------------
Inventor Professional 2012 SP1 (25 seats with subscription)
Windows 7 64 bit
Lenovo D20, 12 GB RAM, Intel Xeon X5687 3.6 GHz, SSD
Quadro 4000, driver 8.17.12.9573, dual monitors
SpacePilot, driver version 6.15.3 Firmware 3.12
Message 3 of 9
stefanome
in reply to: JohanLarsson

Any comment about the interface/interaction?

 

Management of ribbon, panes, forms?

 

Management of graphic area actions like selection by pick, selection by windows, drag & drop, context menus?

 

I have experience with other systems, I'm just trying to figure out what is the best approach.

 

Thanks,

Stefano

Message 4 of 9
stefanome
in reply to: JohanLarsson

This post, at the end, says that I can't debug a .net application with a 64 bit computer:

http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/Debugging-in-VB-NET-Express-2005-2008/... 

 

Is that still true with Inventor 2012?

 

If that is the case I don't see how the productivity of a .net environment could be higher than a VBA environment.

I will stick with VBA... unless there are other limitations with VBA.

 

Thanks,

Stefano

Message 5 of 9
BillPIII
in reply to: stefanome

You are doing customization beyond what you can do with Ilogic?

Message 6 of 9
stefanome
in reply to: BillPIII

Yes, it is going to be a full work environment, and it will take me 3-4 months to build.

I will have:

- a set of tools to help me create sketches with images in the right position and with the right scale;

- a dialog with a tree view and a few buttons to navigate through my components and images;

- a set of tools to gather information and create reports for sales, estimating and engineering departments.

 

I am reading about the different customization techniques, and building my belief table (see below)

If the table is correct then the right solution could be to build a plugin, easy enough to debug, and when it's stable convert it into an addin, to improve the performance.

 

Do you think it's a good approach?

 

VBA pros

- easy to debug

- easy to install

- good performance

 

VBA cons

- not a good long term solution, because Microsoft already abandoned it

- not a good short term solution, because of poor object oriented management and poor interface

 

plugin pros

- easier to debug than addin

 

plugin cons

- more difficult to debug than VBA

- low performance (it's out of process, right?)

 

addin pros

- best performance (it's in process, right?)

 

addin cons

- half nightmare to install

- full nightmare to debug

 

Thanks,

Stefano

Message 7 of 9
BillPIII
in reply to: stefanome

I can't speak to that as I have not tried all of them. I just know what I've done with just the tools in Inventor.

 

I have assemblies that use similar parts. So at first I had the basic part shapes as clickable icons. One icon would create an excel file. So as I click the parts, it asks for the excel file and then I click on the one I just created. This tied all the parts together as I would just change values or have excel lookup values. So other than some code for the icons, most of the work was done in excel and was able to use regular excel functions.

 

There was another project where I have inventor draw up custom shipping containers made of planks of wood. The box dimensions always vary. So you enter the number in excel and it sorts the available board sizes and determines how many are needed to make the box. Inventor then draws the box with hinges. I just save the excel file, hit update in inventor, and the working drawing is ready and I hit print. No VBA for excel needed.

 

So now I am utilizing Ilogic to get away from interfacing myself with excel. I still use it through Ilogic but I can enter everything inside Inventor and instead of several basic part shapes, there are fewer parts but with selectable part shapes. Then the assembly can dictate certain dimensions and parts and also have part numbers of the off-the-shelf parts handy. This project isn't 100% complete but looks like it will be slick. I only knew some VBA before using Ilogic which I guess is based on VB.net. I haven't found any big road blocks despite being a hacker in the original sense of the term (hacking my way through it).

Message 8 of 9
stefanome
in reply to: BillPIII

What do you mean by "clickable icons" ?

Are they icons that you can stick on the model, and then they trigger events that you can use?

Message 9 of 9
BillPIII
in reply to: stefanome

No, I mean just user commands with Icons that are handy in the ribbon.

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

Post to forums  

Autodesk Design & Make Report