Great feature.
Are you able to apply a custom icon to the rules? They don't seem to copy the icon from the list.
Solved! Go to Solution.
Solved by mat_hijs. Go to Solution.
Good question Ben. It doesn't look like there's anything other than the default scroll/script icon. I hope someone here has a better solution.
I use the "Button Constructor" app' - see https://clintbrown.co.uk/2020/11/28/run-ilogic-rules-from-the-ribbon/ - which works a treat in Inventor 2022. Haven't tried it in 2023 yet.
I believe you can customize the icon by placing png images in the same folder as your external rule or global form. Try this out.
For a rule named "RuleX":
For a form named "FormX":
For the small/large I believe they should be either 16x16 and 32x32, but I'm not 100% sure about that.
@mat_hijs wrote:I believe you can customize the icon by placing png images in the same folder as your external rule or global form. Try this out.
For a rule named "RuleX":
- RuleX.light.small.png
- RuleX.light.large.png
- RuleX.dark.small.png
- RuleX.dark.large.png
For a form named "FormX":
- FormX.light.small.png
- FormX.light.large.png
- FormX.dark.small.png
- FormX.dark.large.png
For the small/large I believe they should be either 16x16 and 32x32, but I'm not 100% sure about that.
I only had the name matching not the extra text. On testing again when it's set to LARGE the icon does work. I have a 16x16 PNG.
I have updated the ButtonConstructor for inventor 2023. It is available in the AppStore. More information can be found on my site: http://www.hjalte.nl/
Jelte de Jong
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.
Blog: hjalte.nl - github.com
@JelteDeJong wrote:I have updated the ButtonConstructor for inventor 2023. It is available in the AppStore. More information can be found on my site: http://www.hjalte.nl/
Is it possible to add Forms with this as well?
Hi, to add a button to the ribbon:
To create a custom icon use:
png format
16x16px or 32x32px
Must be put in the same folder as the Rule is stored
File name:
<Form or rule name> . <Light or dark> . <Small or large> .png
Example: “Push Parameters.light.large.png”
If it doesn't update immediately, restart Inventor.
@mat_hijs
I wonder where you get this info from?
Is it presented somewhere in official documentation or other public source (maybe there are other non-obvious yet worth of attention things described there)?
I read about this in some what's new PDF that I believe was sent to the members of the feedback community. Other than that I haven't been able to find anything about it on the Inventor help.
I believe the PDF you are talking about is the one I created.
I've just had a look now and I don't know if there is a help file anywhere describing how to do this.
To add on to this, for users of dark mode:
From my testing it appears that Inventor will turn any pure white (255, 255, 255) pixels to transparent. If this is blanking out intended white areas of your icon, edit them to use just slightly off white (254, 254, 254) and those pixel will appear white / will not be made transparent by Inventor.
Just dropping a link in here to one of my recent forum responses under another topic that I think will be helpful for some folks that have found this topic.
It has a text file attachment, and within that text file is code for an iLogic rule that can be used to capture both the large and small (or standard) icons of existing buttons that are currently defined within Inventor, and saves them out as png files. Those files are already the correct sizes, correct file types, and have the correct file names for use as button icons that can be used for ButtonDefinitions for other iLogic rules.
But for convenience, I will attach that file here also. But within that other (linked to) conversation are some interesting, and maybe useful alternative codes (and Links) showing how to get other native Inventor images (IPictureDisp) to external files. There have been multiple variations of codes for these types of purposes floating around for years, but many of the older ones are getting very outdated, and may not even work anymore. There are apparently multiple internal variations of these IPictureDisp image data types that Inventor uses internally for various purposes. One variation is used for the Document.Thumbnail (which is an IPictureDisp), and another variation is used for the button icons (ButtonDefinition.LargeIcon & ButtonDefinition.StandardIcon). These two different variations, one designed for Bitmap use, the other for Icon use, require slightly different processes to convert before saving as an external png file.
There is a similar code within that other conversation for saving the document thumbnail images out too, if interested.
Wesley Crihfield
(Not an Autodesk Employee)
Hi @JelteDeJong
is it possible to place the RuleButtonSettings.xml file on the share location? I would like more users to use the same settings.
Can't find what you're looking for? Ask the community or share your knowledge.