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: 

Inventor 2023, ilogic Rules and Forms on Ribbon.

13 REPLIES 13
SOLVED
Reply
Message 1 of 14
BDCollett
1834 Views, 13 Replies

Inventor 2023, ilogic Rules and Forms on Ribbon.

Great feature.

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

13 REPLIES 13
Message 2 of 14
pcrawley
in reply to: BDCollett

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
in reply to: BDCollett

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
in reply to: mat_hijs


@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
in reply to: pcrawley

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
in reply to: JelteDeJong


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

Message 7 of 14
James_Willo
in reply to: BDCollett

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
in reply to: mat_hijs

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

Message 9 of 14
mat_hijs
in reply to: Maxim-CADman77

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
in reply to: BDCollett

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
in reply to: BDCollett

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
in reply to: BDCollett

I can't not get icon to Global Forms.

Message 13 of 14
WCrihfield
in reply to: BDCollett

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
in reply to: JelteDeJong

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.

Post to forums  

Autodesk Design & Make Report