Custom Entity - HideDefaultTabViews

Custom Entity - HideDefaultTabViews

Nick_Hall
Collaborator Collaborator
1,196 Views
4 Replies
Message 1 of 5

Custom Entity - HideDefaultTabViews

Nick_Hall
Collaborator
Collaborator

 

I'm trying to turn off the Default Tabs for my custom entity, and it doesn't appear to work

I have a custom tab that is working as I want, but it would look better if the default tabs were not there 

 

The code I have is below, but it can't be that simple (because otherwise it would work)

Can someone tell me where I'm going wrong

 

Thanks

Nick

 

public IEnumerable<CustomEntityHandler> CustomEntityHandlers()
{
  CustomEntityHandler handler = new CustomEntityHandler("b1f67d6a-0666-4e94-ab23-0b06fed712e1")
  {
    HideDefaultTabViews = true
  };
  return new CustomEntityHandler[] { handler };
}
0 Likes
Accepted solutions (1)
1,197 Views
4 Replies
Replies (4)
Message 2 of 5

Markus.Koechl
Autodesk
Autodesk
Accepted solution

You need to collect all existing tabs, add your custom one and use as a replacement. Find uploaded an extended SDK sample "Hello World" that implements this approach. A preview of the code:

DetailPaneTab mExisting = new DetailPaneTab("File.Tab.MyGrid", "OverrideTab", SelectionTypeId.File,
                typeof(DetailPaneTab));
            fileTabs.Add(mExisting);
            mExisting.Replaces = "File.Versions"; // .Uses, .WhereUsed, .View ;see application.TabPageIds for valid values (break log on to review)

Note - the sample is Vault API 2018.



Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
0 Likes
Message 3 of 5

Nick_Hall
Collaborator
Collaborator

Hi Markus

 

That works well & I have my tab replacing one of the Custom Object tabs

 

There are two standard Custom Object tabs, and I don't really want either to be visible

 

I've "fixed" it for now by adding an "About" tab and using this as a replacement for the second (which isn't too bad), but is it possible to hide the tab completely?

 

Thanks for your help so far

 

Nick

0 Likes
Message 4 of 5

Markus.Koechl
Autodesk
Autodesk

Hi Nick,

As far as I oversee the principle we need to have a 1:1 ratio of default tabs being replaced and custom tabs working as a replacement.

 



Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
0 Likes
Message 5 of 5

Nick_Hall
Collaborator
Collaborator

Hi Markus

 

That's fine. I can work around that

 

Nick

0 Likes