How to create the most dead-simple add-in possible

How to create the most dead-simple add-in possible

DRoam
Mentor Mentor
1,855 Views
6 Replies
Message 1 of 7

How to create the most dead-simple add-in possible

DRoam
Mentor
Mentor

I've built a bunch of VBA-based custom tools, and I have a VBA sub/macro that creates ribbon buttons for them. I'm about to deploy these tools for the rest of the engineering department to use, by simply getting everyone's Inventor pointing to the same VBA project on the network.

 

The only problem is, the button-creator macro has to be run each time Inventor is started.

 

Eventually, I want to package these tools into a proper add-in. But that's going to be a big project. I don't know how to create an add-in, and from the guides I've seen, it's pretty complicated, and requires a Visual Studio license to do it right, which we don't have yet.

 

The ideal solution in the meantime would be if I could simply get my button-creator sub to run automatically when Inventor starts. I would guess the only way to do this is with an add-in. So here is my question:

 

Could someone show me how to create a dead-simple add-in that does one thing and one thing only: fires a VBA sub from the ApplicationProject.

 

Would such an add-in be pretty simple? Could it be done without needing a Visual Studio license? Could someone walk me through all of the steps to create such an add-in? (Hopefully this task is simple enough that that's not asking much?... *fingers crossed*)

 

If creating an add-in that does this one little thing is just as involved as creating any other add-in, then I guess we'll have to put up with running the button-creator rule each time we start Inventor, until I can create a full, proper add-in.

 

Thanks for any advice.

0 Likes
Accepted solutions (1)
1,856 Views
6 Replies
Replies (6)
Message 2 of 7

tdant
Collaborator
Collaborator

Running VBA scripts with the API is dead easy. All you need to know is where you want the button to show up. It can definitely be done with a copy of Visual Studio Community, which is free to use. As long as your project is open source, no license is required. I'd be happy to help you with development. I think you'll see through the process that addins aren't as scary as they seem at first.

0 Likes
Message 3 of 7

Frederick_Law
Mentor
Mentor

If you don't need a button for user, you don't need to run that.

Like an event addin.

 

Otherwise you'll need to get used to making buttons, decide where they belong in the ribbon and make graphic for them.

It does take longer then writing the working code sometime.

0 Likes
Message 4 of 7

bradeneuropeArthur
Mentor
Mentor

Hi,

This topic will help you I hope.

https://forums.autodesk.com/t5/inventor-customization/tooltip-on-button/m-p/8643969#M95356

it was from last week, so fresh...

 

Regards,

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

Message 5 of 7

DRoam
Mentor
Mentor
Accepted solution

Thanks all, I came across this recorded AU class by Brian Ekins on creating add-ins, and it guided me through everything I needed to get started, and more. The Nifty Add-In Template on his website handles all of the extra, slightly-scary overhead required to build an add-in. Using that template I can pretty much just copy over my existing code to the appropriate places. Thanks again to @BrianEkins for the very helpful video and VB template.

Message 6 of 7

ilari_monkare6Q6T9
Contributor
Contributor

Is this "Nifty EXE Macro" somewhere available? I'd like to have a button on the Inventor toolbar for my EXE.

0 Likes
Message 7 of 7

bradeneuropeArthur
Mentor
Mentor

If you use the add-in template you will come already very far!

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes