• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    Autodesk Inventor Customization

    Reply
    Mentor
    Posts: 486
    Registered: ‎10-20-2006

    Add custom Panel to all Tabs

    232 Views, 9 Replies
    10-03-2011 11:22 AM

    Just digging into 2012 and I can't seem to locate a custom toolbar UI. I have a set of customizations that I distribute to my group thru a shared drive and we are used to them all being in one place, in every environment. It appears that in order to do this I have to customize the ribbon tabs for each environment individually and manually???? That can't be the case though, very counterproductive, there must be another way.

     

    Any hints would be appreciated and thanks!

     

    Thanks

     

    Eric

    Inventor 2012 Pro 64bit
    Vault Manufacturing 2010 Admin (2012 soon)
    Windows 7 Pro 64bit
    Quad Core processor 2.26 Ghz
    16 GB DDR3 RAM
    1.5 GB Nvidia Quadro FX 4800
    2 – 320 GB SATA drives

    Please use plain text.
    Distinguished Contributor
    Posts: 350
    Registered: ‎07-12-2007

    Re: Add custom Panel to all Tabs

    11-29-2012 05:22 PM in reply to: ebuckner

    Has this been reolved? Is there an answer? We also want a persistent toolbar, irrespective of environment and tab, per screenshot.

    =============================================
    This is my signature, not part of my post.
    Please use plain text.
    Valued Contributor
    Posts: 59
    Registered: ‎09-18-2006

    Re: Add custom Panel to all Tabs

    11-29-2012 07:29 PM in reply to: robmatthews

    I have created user commands on ipt, iam and idw environments and then undocked the user commands  and repositioned off the ribbon. It worked for me. See attached. Couldn't find any other way.

    Autodesk Product Design Suite Premium 2013
    Microsoft Windows 7 Professional 64bit SP1
    Gigabyte P67A-UD3R-B3, Core i7-2600K CPU
    8.00GB DDR3, NVIDIA Quadro 2000
    Please use plain text.
    Valued Mentor
    Posts: 387
    Registered: ‎03-07-2006

    Re: Add custom Panel to all Tabs

    11-30-2012 07:49 AM in reply to: ebuckner

    autodesk has had requests submitted to improve the functionality of the ribbon.

     

    it is a bit of a sad pity to say the least that we have to carry out work arounds to get some of the functionality back that we used to have...

    -Mark

    Inventor 2014 Pro on Windows 7, 64bit

    (please give Kudos or Tag as Solved if your issue is resolved)
    Please use plain text.
    Distinguished Contributor
    Posts: 350
    Registered: ‎07-12-2007

    Re: Add custom Panel to all Tabs

    12-02-2012 01:17 PM in reply to: binuvarkey

    Thanks for the ieda, Binuvarkey, but we still want to have environment and tab-specific user commands panels available. I guess that we don't have the possibility of two user commands panels?

     

    And Mark, Yes, it is a pity. I can understand the move away from toolbars in general (or at least accept it) but surely we should be able to create custom toolbars for such a requirement as environment-non-specific tools.

    Good to hear from you too, hope you're doing well.

    =============================================
    This is my signature, not part of my post.
    Please use plain text.
    Valued Mentor
    Posts: 387
    Registered: ‎03-07-2006

    Re: Add custom Panel to all Tabs

    12-06-2012 04:36 AM in reply to: robmatthews

    one small thing that seems to help in our new improved interface is just to make a form using the API and arrange all the custom API commands on that...

     

    then fire that form from a button on the quick access toolbar. at least that way we don't have to spend all day arranging custom ribbon commands., Just load the one button & we are back to work again.

     

    no this is not as good as we had available to us a few versions ago i know.

    -Mark

    Inventor 2014 Pro on Windows 7, 64bit

    (please give Kudos or Tag as Solved if your issue is resolved)
    Please use plain text.
    Employee
    Posts: 152
    Registered: ‎07-21-2006

    Re: Add custom Panel to all Tabs

    12-06-2012 12:01 PM in reply to: Mark_Wigan

    It is still possible, through the API, to create a toolbar.  You'll need to set your development environment to show hidden functions, but they're still there and do work.



    Brian Ekins
    Inventor API Product Designer
    Manufacturing Solutions
    Autodesk, Inc.
    Please use plain text.
    Valued Mentor
    Posts: 387
    Registered: ‎03-07-2006

    Re: Add custom Panel to all Tabs

    12-08-2012 06:53 AM in reply to: ekinsb

    Thanks mate.

     

    not sure how to go about it but will attempt to investigate.

     

    most of us are trying to get work done not have so spend more time doing work arounds. Why is AD making life hard for us?

    -Mark

    Inventor 2014 Pro on Windows 7, 64bit

    (please give Kudos or Tag as Solved if your issue is resolved)
    Please use plain text.
    Distinguished Contributor
    Posts: 350
    Registered: ‎07-12-2007

    Re: Add custom Panel to all Tabs

    12-09-2012 01:29 PM in reply to: Mark_Wigan

    Hey Gents. Here is where I am so far.  I have created the button definitions, and the toolbar, and turned on the visibility.  I have no functionality or images to the buttons yet, but it's a start. (Plus its probably a bit cobbled together from the help, as I am no expert programmer.)

     

    One part that I am struggling with is destroying the button definitions. How do I do that? (If i have run the routine, and generated the toolbar, and then deleted it with the other routine, I can't re-build it, because the button definition names still exist.)

     

    Plus I'm not sure what you mean, Brian, when you say to show hidden functions.

     

    Please excuse any poor form you see, and feel free to correct me.

    =============================================
    This is my signature, not part of my post.
    Please use plain text.
    Employee
    Posts: 152
    Registered: ‎07-21-2006

    Re: Add custom Panel to all Tabs

    12-11-2012 02:35 PM in reply to: robmatthews

    Here's some simple code that demonstrates the process in VB.Net.  This would typically be in the Activate method of an add-in where it would be executed once every time Inventor starts up.  There are a couple of things to point out. 

     

    • It always re-creates the button definition.  This is because Inventor does not remember custom control definitions from one session to the next.
    • It attempts to first get an existing command bar, and if it doesn't find one, then it creates it.  This is because Inventor does remember the command bars from one session to the next.  It also remembers the buttons on the command bar so you don't need to recreate those either.

     

    def1 = invApp.CommandManager.ControlDefinitions.AddButtonDefinition("Test", "test1", Inventor.CommandTypesEnum.kQueryOnlyCmdType)
    
    Dim cBar As Inventor.CommandBar = Nothing
    
    ' Attempt to get the existing command bar.
    Try
        cBar = invApp.UserInterfaceManager.CommandBars.Item("My Bar")
    Catch ex As Exception
    End Try
    
    ' Check to see if the existing bar was found.
    If cBar Is Nothing Then
        ' Create a new command bar.
        cBar = invApp.UserInterfaceManager.CommandBars.Add("My Bar", "My Bar")
    
        ' Add the buttons.
        cBar.Controls.AddButton(def1)
    End If
    
    cBar.Visible = True
    

     

    Another approach is to create if from scratch each time.  When calling the CommandBars.Add method there is an optional argument for the ClientId that I didn't use above.  If that is provided, then Inventor will not remember the command bar from one session to another.

     

    Finally, what I meant by hidden functions is that there are methods in the API that are marked as hidden.  By default they won't show up in the Object Browser or Intellisense.  These are typically for functionality that is now obsolete or has been replaced by a more powerful function.  In VBA you can right-click in the Object Browser and specify that hidden objects and functions should be shown.  In .Net there is similar functionality in its Object Browser.  However, I haven't found a way to have them show up in Intellisense.  You can still use them but you have to now what to type in.  I did some searching online and found a couple of articles but no solution.  Seems it inconsistent because they referred to it working on some computers but not others.



    Brian Ekins
    Inventor API Product Designer
    Manufacturing Solutions
    Autodesk, Inc.
    Please use plain text.