Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Icons/Display text for macros

11 REPLIES 11
Reply
Message 1 of 12
mslosar
1050 Views, 11 Replies

Icons/Display text for macros

Short of converting to an add-in is there any way to place macro's into toolbars where you can set the Text of the button to something other than the macro name?

 

I mean, while to those who write them, there's nothing wrong (really) with a command button titled Invoke_This_Fuction or InvokeFunction, it looks quite odd to everyone else.

 

If the only way is via add-in, that's fine (though a friendly display name should be an option).

 

Just trying to find out before I spend a boatload of time only to figure out you can't 🙂

 

Also, do all add-ins 'have' to be installed? Or is there a way you can just drop a file in the correct path and it'll appear on next running of Inventor?

11 REPLIES 11
Message 2 of 12
rob.j.ross
in reply to: mslosar

You can set the text of the button to something other than the macro name.  I use icons but you could create an icon with whatever text you wanted.  Here is what mine look like.

 

Macros.png

 

Tools-Customize-Ribbon-Choose Commands from-> then place into whatever panel you want.  You can also place them in the Quick access toolbar at the top of the window by right clicking and selecting "Add to Quick Access Toolbar".

 

Registry free Add-in do not have to be installed.  The AddIn files can be placed in a folder under:

 

C:\Users\User\AppData\Roaming\Autodesk\ApplicationPlugins

 

and Inventor will automatically find/load them.  You must also copy the .AddIn file from your projects folder to that location.

____________________________
Inventor Professional 2014 64 Bit
Windows 7 Professional
NVIDIA Quadro FX 4600
Dual Intel Xeon E5540 CPUs
16GB DDR3 Ram
Message 3 of 12
mslosar
in reply to: rob.j.ross

I'm in 2013, and when I add via Tools-Customize-Ribbon I can check a box to show the text name of the macro, an icon, and that's it. The third column is just the name of the macro for reference so you know what command you've added to the panel.

 

I don't see any place I can change the text display of the macro from something like RN_DWG_FILE to "Rename Drawing File". If i'm missing something that lets me alter the text, please let me know.

 

It's good to knwo that about add-ins. Thanks.

Message 4 of 12
rob.j.ross
in reply to: mslosar

The only way to change this is to rename your macro what you want it to say.  Change your macro name from RN_DWG_FILE.ivb to Rename_Drawing_File.ivb  If you are using autorun from the Default.ivb you will need to update the name there too.

 

Another option is to create a 32x32 macro icon with exactly the text you want to display and use the "Large" option under customize.

____________________________
Inventor Professional 2014 64 Bit
Windows 7 Professional
NVIDIA Quadro FX 4600
Dual Intel Xeon E5540 CPUs
16GB DDR3 Ram
Message 5 of 12
mslosar
in reply to: rob.j.ross

The whole point of the question was to get out of having a visible name strung together or using underscores and to use normal text.

 

Clearly, it's still not possible. Very disappointing.

 

As for the icon issue, that'd be great except for large icon display is bugged in 2013 and 2014 and i haven't heard of any fixes yet. A bunch of giant @ symbols isn't going to help anything 🙂

Message 6 of 12
skyngu
in reply to: mslosar

they fixed it in 2014
Autodesk Inventor Professional 2019
Message 7 of 12
ekinsb
in reply to: mslosar

As you've found, you can't override the text of the button and for macros this text comes from the name of the Sub.

 

The only workaround that I can think of shy of re-writing your VBA macros as add-ins is to write a single add-in that creates buttons and then runs the associated VBA macro when the corresponding button is clicked.  The advantage of this is that you have full control over the button including where it is positioned within the ribbon.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 8 of 12
RichardGarner.tec
in reply to: mslosar

You can use the AutoCustomize add-in which is located in Inventor SDK -> UserTools.

 

Message 9 of 12
eljoseppo
in reply to: mslosar

Oh, come on. There is a way to bypass this issue.

 

Export your settings to xml file, then open with Notepad, find "RN_DWG_FILE" an replace to custom text. Import settings. Done.

 

Hope that's helpful

Message 10 of 12
mslosar
in reply to: eljoseppo

Never would have thought of that. 🙂

 

It does work. It'd be perfect if it was just for me. However, since i've sort of got to automate the process of getting this out ot a number of people, I don't know that this is the way to go.

 

Apparently i'm going to be gettng visual studio soon so i'll be able to to the add-in route. I didn't know that'd be an option until last friday.

 

 

Message 11 of 12
matroosoft
in reply to: mslosar

You can add a space in a sub's name by using Alt+255

Message 12 of 12
NachitoMax
in reply to: matroosoft

hi

you can name an icon to the exact name of the sub and as long as the image is in the same folder as the project.ivb, it will show on your button.

 

example:

bmp file 32x32

module name in VBA = mod_MyCode

Method / sub in the vba project module = UpdateLabels

Size = Large / Small

 

icon name should be "mod_myCode.UpdateLabels.Large.bmp" and "mod_myCode.UpdateLabels.Small.bmp"

 

Nacho

Automation & Design Engineer

Inventor Programmer (C#, VB.Net / iLogic)


EESignature


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report