We are using Inventor 2011.
I recently switched all of our Inventor users over to 64 bit Windows 7.
They like the elbow room it provides but the VBA suite of 32 bit VBA programs have problems
Occasionally they crash with a 32 bit memroy error. Or just lock up.
All 12 of these main tools work flawlessly on a 32 bit windows 7 PC.
I've been rewriting them as dlls that I lauch with iLogc as an interm process unfortulately I'm told that iLogic also runs as a 32 bit process.
Because of this I am looking into rewriting the entire suite as addins.
I am assuming running the applets in the 64 bit memory space will solve some or all of the issues we are experiencing..
My problems is I Find writing for the ribbon unintuitive, confusing and a royal pain. Still haven't made a successfull addin of this type.
Can one write each addin as a separate tool with embedded icons such that after loading they are available in the customize tool | commmands tab? Perhaps under Addins? At that point they could be added to whatever tool inside inventor manually.
Are there any samples or examples of how to write an addin like this?
A good place to start would be by downloading the Autodesk Labs Screenshot Plugin of the month from here:
It comes complete with the source code and will work on Inventor versions 2008 thru' 2012.
Within the source it defines at least one button within the RibbonBar as well as a Visual Studio Installer Project for installation purposes.
What is an inventor Screen Shot, What will it do to my system, and what will it do for me?
I Really hate to download someting when I do not know what it is.
I've looked at Add_in samples that supposedly add things to the riboon. As I said I can make no sense of it.
This is why I am looking for a simpler way.
Unfortunately you're going to have to wade in and figure out how to do it the way the Inventor API enables you to do it. As a very basic outline you have to create a button definition (think of it as creating a button) when your add-in loads. The button definition describes the type of button, possibly images associated with the large and small versions of the button. Most importantly, you have to write some code that gets linked to the event that happens when a user clicks on your button.
You must then add that button to a panel on one or more ribbons. Each environment (part, assembly, sketch, etc) in Inventor has its own set of ribbon tabs and associated panels. You can add your button to one or more of these depending on what you want to act on when the button is clicked. In addition you can define your own tab(s) and / or panel9s) and add these to the UI and place your button there.
It does take some commitment to become familiar with the workflow, but once you get it, it's not so bad. There are plenty of resources to help you out and provide good examples. The My First Plug In post at the top of this forum is a great place to start.
As usual, no free lunches
The Inventor Screenshot tool was written in response to a comment I raised on the Through-the-Interface blog; It simply allows the user to take a screenshot and save the resultant image to a location of their choosing on the system somewhere.
As Neil said, it takes a bit of reading to get to grips with, but if you wrote the original vba you should have little or no problems switching it over.
The "My First Plugin" post is a great place to start.
Note: iLogic is an add-in and it runs in the Inventor process. On a 64-bit system, iLogic is 64-bit.
I ran into the same problem with crashing when we started using 64bit windows. I found that certian commands in the program need to be delayed in order for the previous command to complete (preventing the crashes). In VBA it had its own module for delays that I found on google, VB.NET call system.threading.thread.sleep(<milisecondsOfWaitTi
Are you talking vertion 2011 or 2012?
I swear you told me in another post that iLogic was 32 bit when launched from VBA.
Are you suggesting I write an addin that has an interface to run external 64 bit iLogic dlls from the Addin?
Getting confused here.
When an iLogic rule is run from VBA on a 64-bit system, it will run on a separate thread. It's still in the 64-bit Inventor process, but it's on a separate thread: not the main thread. Some things don't work the same on the separate thread.
So the changed behavior is related to the fact that VBA is running in a separate 32-bit process, but technically everything in Inventor is running in 64-bit.
If running iLogic rules is the best way to do what you're trying to do, then they should run better if you run them from an add-in, as compared to VBA. But it might be easier to do everything you want within your add-in, without using iLogic.
Okay. I guess the problem with writing them as addins or combining them into one addin is develpment is slow. My users are use to the quick turn around time afforded by developing and debugging in the field in VBA.
I was hoping to modularize each applet in my suite of tools such that I could recompile and disttribute the applets piecemeal. or for that matter add new applets to the suite without having to rewrite my Addin.
The bottom line though is that I want to eliminate all of my 64 bit issues in my custom apps so I will do whatever it takes to get there.
On another note. What is the logic behind al these GUIDs in the StandardAddInServer.vb file?
Looking at the source for the ScreenShot Addin...
Is the Class Attribute that contains a GUID a fixed value like other Inventor API GUIDs or do I need to draw a new GUID for each Addin Class? Does the m_ClientId GUID always match the Class GUID?
Further Down in the COM Registration section. do I need to draw a new GUID for the the Register and UnRegister Sub Routines for each addin or is that a fixed value?