Inventor 2023, ilogic Rules and Forms on Ribbon.

Inventor 2023, ilogic Rules and Forms on Ribbon.

BDCollett
Advisor Advisor
2,852 Views
13 Replies
Message 1 of 14

Inventor 2023, ilogic Rules and Forms on Ribbon.

BDCollett
Advisor
Advisor

Great feature.

Are you able to apply a custom icon to the rules? They don't seem to copy the icon from the list.

Accepted solutions (1)
2,853 Views
13 Replies
Replies (13)
Message 2 of 14

pcrawley
Advisor
Advisor

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.

Peter
Message 3 of 14

mat_hijs
Collaborator
Collaborator
Accepted solution

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.

Message 4 of 14

BDCollett
Advisor
Advisor

@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.

Message 5 of 14

JelteDeJong
Mentor
Mentor

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.

EESignature


Blog: hjalte.nl - github.com

Message 6 of 14

BDCollett
Advisor
Advisor

@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?

0 Likes
Message 7 of 14

James_Willo
Alumni
Alumni

Hi, to add a button to the ribbon:

  • Right click a ribbon Customize User Commands
  • Filter rules/forms in the drop down
  • Ensure the correct tab is listed
  • Double click a rule to add
  • Add text or make large

 

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. 



James W
Inventor UX Designer
Message 8 of 14

Maxim-CADman77
Advisor
Advisor

@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)?

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
Message 9 of 14

mat_hijs
Collaborator
Collaborator

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.

Message 10 of 14

James_Willo
Alumni
Alumni

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. 

 

 



James W
Inventor UX Designer
Message 11 of 14

Ethibaudeau
Advocate
Advocate

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.

Message 12 of 14

Quoc_Kiet
Explorer
Explorer

I can't not get icon to Global Forms.

0 Likes
Message 13 of 14

WCrihfield
Mentor
Mentor

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.

https://forums.autodesk.com/t5/inventor-programming-ilogic/save-thumbnail-as-image-file/m-p/13014204... 

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

EESignature

(Not an Autodesk Employee)

Message 14 of 14

kresh.bell
Collaborator
Collaborator

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.

0 Likes