toolbarTab visibility

toolbarTab visibility

pludikar
Collaborator Collaborator
419 Views
2 Replies
Message 1 of 3

toolbarTab visibility

pludikar
Collaborator
Collaborator

So, as part of the clarification in the last API update, the "isVisible" property of many of the UI API functions was made read Only.  The question is:  How do you change the visibility of a toolbarTab?

 

I think the issue is one of:

  • Changing visibility is not implemented (You can check if it's visible, but no way to affect it).
  • There's a bug
  • or... I'm missing something

For example, the toolbarTab for SketchTab is invisible until Sketch is activated - I would really like to do the same, and I would consider that an essential feature, if anyone wants to create a custom addIn that emulates the way built-in features work.

 

Peter  

I'm not an expert, but I know enough to be very, very dangerous.

Life long R&D Engineer (retired after 30+ years in Military Communications, Aerospace Robotics and Transport Automation).
0 Likes
420 Views
2 Replies
Replies (2)
Message 2 of 3

goyals
Autodesk
Autodesk

Hi Peter,


You are right. "isVisible" property on ToolbarTab is ready only property. ToolbarTab visibility is controlled by panels present under it. If you hide all the panels of a tab then tab goes invisible but I noticed that there is no set visible property on panel as well.

Only workaround is to add new tab when you click on command like "Create Sketch" when add-in want to activate a new tab and delete it when command like "Finish Sketch" is executed.  

Sketch text is more like a context based tab which is activated only when user want to create a sketch and disappear when sketch creation is done. Other tabs are permanent tabs which are always visible. This might be thinking for not providing set visible property on tab and panel.



Shyam Goyal
Sr. Software Dev. Manager
0 Likes
Message 3 of 3

pludikar
Collaborator
Collaborator

@goyals 

Hi Shayam,

I'd suggest that the work around is actually quite time consuming to program and to get right, particularly if there's more than a few commands in the panel.  One of the issues is if one or more of the commands are either 'promoted' or 'promotedAsDefault' - it appears that the panel will still be visible while the buttons are promoted. 

 

To achieve the delete and create Tab work around, you have to basically map and save each button, then restore each on create, because if a user makes a button configuration change you wouldn't want to have to get the user to make those changes every time they invoke the addIn.

 

Hopefully you'll consider making it much more programmer friendly by allowing Tab (and Panel) visibility to be set in a near future API release.

 

Peter

I'm not an expert, but I know enough to be very, very dangerous.

Life long R&D Engineer (retired after 30+ years in Military Communications, Aerospace Robotics and Transport Automation).
0 Likes