Add a Button to Export tab of Application Menu in Inventor

Add a Button to Export tab of Application Menu in Inventor

Anonymous
Not applicable
454 Views
3 Replies
Message 1 of 4

Add a Button to Export tab of Application Menu in Inventor

Anonymous
Not applicable

Hi,

 

Need some help for adding a button to "Export" tab of Application Menu of Inventor. I am using Vc++.

The information that i found is from UserInterfaceManager i could get CommandControls and add a button/ Seperator here. Need to add this inside the "Export" tab.

I would be glad if anybody could help me with the same.

0 Likes
455 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable

I have just finished doing the same in C#:

 

Application.UserInterfaceManager.FileBrowserControls["Export"].ChildControls.AddButton(exportButton.ButtonDefinition, true, true, "", false);

 

 

0 Likes
Message 3 of 4

Anonymous
Not applicable

Hi,

Thank You for your reply.

I tried implementing the same in C++(VC). Please find the bellow code snap:

CComPtr<CommandControls> pcmdControls;

pcmdControls = pUserInterfaceMgr->FileBrowserControls;

CComPtr<CommandControl> pcmdControl;

hr = pcmdControls->get_Item(CComVariant(_T("Export")),&pcmdControl);

CComPtr<CommandControls> pcmdcontrolsExp;

hr = pcmdControl->get_ChildControls(&pcmdcontrolsExp);

hr =pcmdcontrolsExp->AddButton(pDrawSlotCmdBtnDef,true, true, "",false);

 

But this fails.. Request you to let me know where is the problem. Thank you for the help.

 

0 Likes
Message 4 of 4

Anonymous
Not applicable

Hey,

 

Its working. I Kept the Internal Name blank while adding the Button to the child control.

Thanks.

 

-Kalyani

0 Likes