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: 

UseLargeIcon = FALSE failed

4 REPLIES 4
Reply
Message 1 of 5
Rene_Gerlach
321 Views, 4 Replies

UseLargeIcon = FALSE failed

I try to set the UseLargeIcon in a Ribbon PopupButton to FALSE.

This results in a E_FAIL.

 

If i add the button not to an PopupButton, i can set UseLargeIcon to FALSE without any problems

 

Any ideas why?

 

Cheers

 

Rene

 

4 REPLIES 4
Message 2 of 5
adam.nagy
in reply to: Rene_Gerlach

Hi Rene,

 

A sample code says a thousand words 🙂 and makes it clearer what you mean. First I thought you were talking about setting the ButtonPopup's UseLargeIcon to false - which works fine: 

AddButtonPopup(coll, false);

But then realized you probably meant the buttons inside it (modifying the SimpleAddIn project from the SDK samples):

ObjectCollection coll = m_inventorApplication.TransientObjects.CreateObjectCollection();

coll.Add(m_drawSlotButton.ButtonDefinition);
coll.Add(m_addSlotOptionButton.ButtonDefinition);
CommandControl buttonPopup = partSketchSlotRibbonPanelCtrls.AddButtonPopup(coll, false);
buttonPopup.ChildControls.AddButton(m_drawSlotButton.ButtonDefinition, false); 
buttonPopup.ChildControls[1].UseLargeIcon = false; // << FAILS

It seems to me that inside the UI none of the popup button's children are small, unless they are checkboxes, like in View [tab] >> Appearance [panel] >> Shadows. So if you want to be consistent with the UI you would not force child buttons to be small.

Also, I think if making the child buttons small was supported it should be a property on the CommandControl (buttonPopup above) since setting it on a per child basis would look strange in my opinion.

 

Cheers,

 



Adam Nagy
Autodesk Platform Services
Message 3 of 5
Rene_Gerlach
in reply to: adam.nagy

Hi Adam,

 

thanks for your testing and comment.

But please see here:

UseLargeIcon.png

 

The switch is a popup with small childs from Inventor.

This is also mentioned in the API-documentation -> AddPopup: "An example of this type of control is the 'Switch' control available in the Windows panel of the View tab." I looked at this and saw the small buttons. 

Thats why I tried to set my own buttons like these one.

 

Cheers 

 

Rene

Message 4 of 5
adam.nagy
in reply to: Rene_Gerlach

Hi Rene,

 

I talked to engineering and it does not seem possible through the API at the moment. I logged a change-request for this feature, id 1518065.

 

Also, it is unfortunate that the example in the help file points to a control that cannot be reproduced through the API. As I understand, the help file will be modified to avoid this.

 

One thing that might work and you could try is using the generic Ribbon API directly. Not sure if it would have any side effects though:

http://adndevblog.typepad.com/manufacturing/2014/01/modify-ribbon-and-menu-items.html  

Unless it's really necessary to have small child controls I would just use what the API currently offers.

 

Cheers,



Adam Nagy
Autodesk Platform Services
Message 5 of 5
Rene_Gerlach
in reply to: adam.nagy

Hi Adam,

 

thanks for the CR.

Please change the API not the documentation Smiley Wink

 

Cheers

 

René

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

Post to forums  

Autodesk Design & Make Report