Passing VBA variable to iLogic

Passing VBA variable to iLogic

Anonymous
Not applicable
806 Views
3 Replies
Message 1 of 4

Passing VBA variable to iLogic

Anonymous
Not applicable

I'm trying to pass a string variable from a VBA function (using VBA editor, not VB.net) to iLogic. I'm stumped. I thought that maybe using the syntax: stringName = InventorVB.RunMacro(....) would work, but it's not passing the variable. Anyone have an idea? Is it possible?

0 Likes
807 Views
3 Replies
Replies (3)
Message 2 of 4

MechMachineMan
Advisor
Advisor

Hi, 

 

Using the programming documentation it appears that you can use a ByRef variable to get a return value from the macro when you use the execute method.

 

http://help.autodesk.com/view/INVNTOR/2018/ENU/?guid=GUID-EDE3F358-CAEB-453A-AE3C-589C59732D3F

 

 


--------------------------------------
Did you find this reply helpful ? If so please use the 'Accept as Solution' or 'Like' button below.

Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization


iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming| Continuous Pick/Rename Objects

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells | Fourth BOM Type
0 Likes
Message 3 of 4

Anonymous
Not applicable

Hmmm, I was hoping that would be it, but I feel like that object is a vba object, not an iLogic object. I've got the VBA code returning a string, it's just that iLogic is bringing it back over.

 

So, I send some arguments to VBA, it process them and creates a string that I want to send BACK to iLogic.

0 Likes
Message 4 of 4

MechMachineMan
Advisor
Advisor

Sure. But at the end of the day, all of the calls are still utilizing the API (regardless of what programming language you are using), so the link I posted is still valid.

 

Sure, there might be a snippet in iLogic that does it as well, but good luck finding documentation on it to point you in the right direction!


--------------------------------------
Did you find this reply helpful ? If so please use the 'Accept as Solution' or 'Like' button below.

Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization


iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming| Continuous Pick/Rename Objects

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells | Fourth BOM Type
0 Likes