IconSize.bmp”, the size can only be "Small" or "Large". The icons will need to be named very specifically in order for them to work. The naming convention is “ ModuleName. You will need 2 sizes, a Large (32x32px) and a Small (16x16px). You can create Bitmap icons for your Macro. These external rules can be controlled centrally. This global form can have buttons showing any number of external rules.
#Autodesk inventor requirements code#
Synta圎ditor Code Snippet iLogicForm.ShowGlobal("Form Name") This form can be edited and shared with your team, without having to change the VBA, the code to implement this is very simple (see below). This rule should simply fire up a global iLogic form. I would suggest that you use 1 external iLogic rule. This makes any updates to the "button/s" more difficult. ivb file (accessed through the VBA editor) will need to be manually edited on each user's machine. Note the options for size and text (see the section on Button icons below). You can add your macro to the ribbon, as shown below. To add your macro to the ribbon, right click on the ribbon, and select "Customise User Commands" then select "Macros" from the drop down menu on the left hand side. The external rule is currently commented out, in favour of the internal rule (see the last 3 lines of code). The external rule in this instance is set to "3D PDF" (based on a rule from a previous blog post). The code can be adjusted for an external rule. I've set the code in the text file to look for an internal rule named "Rule0", you can change this to match your rule name. Then paste the code from the attached text file into your VBA editor under "Module 1" as shown. Once the Macro is created, you can add it to the Ribbon.įirstly, make a backup copy of the following file: C:\Users\Public\Documents\Autodesk\Inventor XXX \Default.ivb
To create a button for an iLogic rule on the ribbon, you will need to create a VBA macro in Inventor that will fire an iLogic rule. But the good news, is that Inventor has a built in VBA editor, and Macros created in this editor can be added to the Ribbon Interface. Unfortunately, this is not possible using iLogic alone. A common request from Inventor users, is the ability to run iLogic rules from Inventor’s Ribbon interface.