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: 

Add Textbox to Ribbon

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
GeorgK
1465 Views, 8 Replies

Add Textbox to Ribbon

Hello together,

 

is it possible to add a textbox to the ribbons in Inventor 2013?

 

Thanks

 

Georg

8 REPLIES 8
Message 2 of 9
Ralf_Krieg
in reply to: GeorgK

Hello

 

Afaik no, but take a look at dockable windows, where you can display similar everything.


R. Krieg
RKW Solutions GmbH
www.rkw-solutions.com
Message 3 of 9
ekinsb
in reply to: Ralf_Krieg

The previous answer is correct.  You cannot create a text box in the ribbon.  You can create a text box in a mini toolbar.  This is what many of the commands now use to replace dialogs, like the extrude command.  Another option, as already suggested, is a dockable toolbar.  These host controls that you can write in .Net so they can contain anything, including a text box.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 4 of 9
GeorgK
in reply to: ekinsb

Please could you send me an example for both solutions.

 

Thank you very much.

 

Georg

Message 5 of 9
Ralf_Krieg
in reply to: GeorgK

Hello

 

Completly copied from Autodesk Inventor Programmers help:

 

Dockable window API Sample Description

This sample demonstrates creating a dockable window and adding a dialog into it.

Code Samples VBA Sample Code

You need to create the (modeless) dialog and set the hwnd of the dialog in the code below.

 

 

Sub DockableWindow()

    Dim oUserInterfaceMgr As UserInterfaceManager
    Set oUserInterfaceMgr = ThisApplication.UserInterfaceManager

    ' Create a new dockable window
    Dim oWindow As DockableWindow
    Set oWindow = oUserInterfaceMgr.DockableWindows.Add("SampleClientId", "TestWindowInternalName", "Test Window")

    ' Get the hwnd of the dialog to be added as a child
    ' CHANGE THIS VALUE!
    Dim hwnd As Long
    hwnd = 4851096

    ' Add the dialog as a child to the dockable window
    Call oWindow.AddChild(hwnd)

    ' Don't allow docking to top and bottom
    oWindow.DisabledDockingStates = kDockTop + kDockBottom

    ' Make the window visible
    oWindow.Visible = True

End Sub

 

© copyright 2012 Autodesk, Inc.Comment on this page.
 

R. Krieg
RKW Solutions GmbH
www.rkw-solutions.com
Message 6 of 9
GeorgK
in reply to: GeorgK

Thank you very much.

Message 7 of 9
GeorgK
in reply to: GeorgK

I used the code in VBA. Now I tried it to use it in an add-in without success. Is there a Vb.Net sample code for it?

 

Thanks Georg

Message 8 of 9
Ralf_Krieg
in reply to: GeorgK

Hello

 

AFAIK there's no special Vb.Net sample code. The methods are the same.

Where exactly is the problem? "Doesn't work" is not very helpful. Smiley Wink


R. Krieg
RKW Solutions GmbH
www.rkw-solutions.com
Message 9 of 9
GeorgK
in reply to: Ralf_Krieg

Hello,

 

I tried thie sample:

 

http://adndevblog.typepad.com/manufacturing/2012/06/embedding-a-wpf-user-control-in-a-dockablewindow...

 

But I could not get it to work. Does it run on your site?

 

Thanks

 

Georg

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

Post to forums  

Autodesk Design & Make Report