Adding references to vba-project

Adding references to vba-project

juha.perala
Explorer Explorer
802 Views
4 Replies
Message 1 of 5

Adding references to vba-project

juha.perala
Explorer
Explorer

Hi,

 

I'm trying to access vault server through some VBA-code to be able to obtain drawing number and save my file in a custom program I'm writing. 

To use the code I have found to make this possible I would have to add these references to my VBA-project:

Autodesk.DataManagement.Client.Framework.Vault

Connectivity.InventorAddin.EdmAddin.dll

 

When I try to do this in Inventor built in VBA-editor Tools-References ->browse (I select the dll-file from folder)

-> ok 

and after that I get error message telling me that can't use that file as reference

 

What am I doing wrong? Is there some other development environment where I should be to use this? 

 

-JuhaP

0 Likes
803 Views
4 Replies
Replies (4)
Message 2 of 5

juha.perala
Explorer
Explorer

After some digging around I have come to the conclusion that visual basic for application (VBA) is such an outdated programming environment that it doesn't support all these new libraries anymore. These same dll-files work just fine when using visual studio and adding them to the projects there. 

Feel free to disagree and prove me wrong. It would help me a lot if I wouldn't have to start trasferring all my codes from vba to new projects in visual studio environment. 

0 Likes
Message 3 of 5

Markus.Koechl
Autodesk
Autodesk

I confirm that VBA is not the environment to focus on; besides the Add-In option you already evaluated, iLogic might provide access to automation without compiling code. iLogic supports native VB.NET and referencing any .NET library. To access Vault from iLogic rules, a library is available on my GitHub iLogic-Vault. Review the documentation https://github.com/koechlm/iLogic-Vault/blob/2021.0.2/Inventor%20iLogic%20-%20Vault%20Quickstart%20L... to get an impression before you dig deeper into this option.



Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
0 Likes
Message 4 of 5

juha.perala
Explorer
Explorer

Thank you for your input to this topic. I have done some programming in i-logic before and I feel it is not something I want to use for anything more complicated than deriving the volume of the handled object. Or something with similar level of difficulty. 

I think I will focus my efforts more on the area of visual studio and create my add-ins in this environment. 

0 Likes
Message 5 of 5

Markus.Koechl
Autodesk
Autodesk

I agree: if your objective is more related to Inventor API in general than to the core iLogic design automation capabilities an add-in extension is the best choice. 



Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe