<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Programmatically create Custom Toolbar to hold Custom Extensions - VB.NET in Vault Customization Forum</title>
    <link>https://forums.autodesk.com/t5/vault-customization-forum/programmatically-create-custom-toolbar-to-hold-custom-extensions/m-p/8268536#M5989</link>
    <description>&lt;P&gt;I'm more so trying to add a&amp;nbsp;toolbar to house commands like this:&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vaultCustomQuestion.PNG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/546277i53AC9433163865A4/image-size/large?v=v2&amp;amp;px=999" role="button" title="vaultCustomQuestion.PNG" alt="vaultCustomQuestion.PNG" /&gt;&lt;/span&gt;I'm not using the vault "Custom Objects". We want to be able to push&amp;nbsp;the toolbar out to users without them having to manually add one themselves.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 14 Sep 2018 13:13:49 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-09-14T13:13:49Z</dc:date>
    <item>
      <title>Programmatically create Custom Toolbar to hold Custom Extensions - VB.NET</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/programmatically-create-custom-toolbar-to-hold-custom-extensions/m-p/8257506#M5987</link>
      <description>&lt;P&gt;I am attempting to create a toolbar programmatically that will store command items to launch functions in our custom extensions through vb.net. I've read through the SDK and found the "CommandSiteLocationConstructor", but when using it I've run into an error I can't find a solution for. I've attempted the following code:&lt;/P&gt;&lt;PRE&gt;Dim testToolbarCmdSiteLoc As CommandSiteLocation = New CommandSiteLocation("test", CommandSiteLocationType.Toolbar)
Dim toolbarCmdSite As New CommandSite("TestCommand.Toolbar", "Add New TestCommand Menu")
toolbarCmdSite.DeployAsPulldownMenu = False
toolbarCmdSite.Location = testToolbarCmdSiteLoc
toolbarCmdSite.AddCommand(AddNewTestitem)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But on the first line where "CommandSiteLocationType.Toolbar" is the following error occurs:&lt;/P&gt;&lt;PRE&gt;Autodesk.Connectivity.Extensibility.Framework.ExtensionException: 'Invalid CommandSiteLocationType' at&lt;BR /&gt;Autodesk.Connectivity.Explorer.Extensibility.CommandSiteLocation..ctor(String customEntityName, CommandSiteLocationType type) at&lt;BR /&gt;.....&lt;BR /&gt;ErrorCodeEnum: IllegalInputParam&lt;/PRE&gt;&lt;P&gt;I haven't been able to find anyone who has run into this error and the "CommandSiteLocationType" is a valid enum in the SDK, so I'm not sure what's invalid about it. I've also tried putting the number equivalent, but the same error occurs. Any help would be appreciated. Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 10 Sep 2018 16:00:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/programmatically-create-custom-toolbar-to-hold-custom-extensions/m-p/8257506#M5987</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-10T16:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: Programmatically create Custom Toolbar to hold Custom Extensions - VB.NET</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/programmatically-create-custom-toolbar-to-hold-custom-extensions/m-p/8268000#M5988</link>
      <description>&lt;P&gt;Your extension applies to a custom object, right? If so, I don't see that you registered the custom object's internal name for the command site location.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For quick reference I am sharing the piece of code, that does the job adding context menus to the custom object's workspace:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;public class mClsChangeMgmtExt : IExplorerExtension
    {
        public const string mECRSystemName = "395e6304-6a49-4363-842c-3b791bffda09";
        public IEnumerable&amp;lt;CommandSite&amp;gt; CommandSites()
        {
            List&amp;lt;CommandSite&amp;gt; sites = new List&amp;lt;CommandSite&amp;gt;();
            // Describe user history command item
            //

            CommandItem mGoToEco = new CommandItem("Command.TestCommand2", "Go To ECO");
            SelectionTypeId mECRSelectionType = new SelectionTypeId(mECRSystemName);
            mGoToEco.NavigationTypes = new SelectionTypeId[] { mECRSelectionType };
            mGoToEco.MultiSelectEnabled = false;
            mGoToEco.Execute += mGoToEco_Execute;
            CommandSite mEcrContextMenu = new CommandSite("Menu.ECRContextMenu", "Go To ECO");
            CommandSiteLocation mECRCommandSiteLoc = new CommandSiteLocation(mECRSelectionType.EntityClassSubType, CommandSiteLocationType.ContextMenu);
            mEcrContextMenu.Location = mECRCommandSiteLoc;
            mEcrContextMenu.DeployAsPulldownMenu = false;
            mEcrContextMenu.AddCommand(mGoToEco);
            sites.Add(mEcrContextMenu);

            CommandItem mGoToECR = new CommandItem("Command.EcoContextMenu", "Go To ECR");
            mGoToECR.NavigationTypes = new SelectionTypeId[] { SelectionTypeId.ChangeOrder };
            mGoToECR.MultiSelectEnabled = false;
            mGoToECR.Execute += mGoToECR_Execute;
            CommandSite mEcoContextMenu = new CommandSite("Menu.ECOContextMenu", "Go To ECR");
            mEcoContextMenu.Location = CommandSiteLocation.ChangeOrderContextMenu;
            mEcoContextMenu.DeployAsPulldownMenu = false;
            mEcoContextMenu.AddCommand(mGoToECR);
            sites.Add(mEcoContextMenu);

            return sites;
        }&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Hope this helps.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2018 09:30:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/programmatically-create-custom-toolbar-to-hold-custom-extensions/m-p/8268000#M5988</guid>
      <dc:creator>Markus.Koechl</dc:creator>
      <dc:date>2018-09-14T09:30:48Z</dc:date>
    </item>
    <item>
      <title>Re: Programmatically create Custom Toolbar to hold Custom Extensions - VB.NET</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/programmatically-create-custom-toolbar-to-hold-custom-extensions/m-p/8268536#M5989</link>
      <description>&lt;P&gt;I'm more so trying to add a&amp;nbsp;toolbar to house commands like this:&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vaultCustomQuestion.PNG" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/546277i53AC9433163865A4/image-size/large?v=v2&amp;amp;px=999" role="button" title="vaultCustomQuestion.PNG" alt="vaultCustomQuestion.PNG" /&gt;&lt;/span&gt;I'm not using the vault "Custom Objects". We want to be able to push&amp;nbsp;the toolbar out to users without them having to manually add one themselves.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2018 13:13:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/programmatically-create-custom-toolbar-to-hold-custom-extensions/m-p/8268536#M5989</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-14T13:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: Programmatically create Custom Toolbar to hold Custom Extensions - VB.NET</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/programmatically-create-custom-toolbar-to-hold-custom-extensions/m-p/9295409#M5990</link>
      <description>&lt;P&gt;Hi Aschwoerer,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did you find a solution for this post? I'm trying to create a new main menu without a context for my custom tools.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;C# Code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CommandSiteLocation testToolbarCmdSiteLoc = new CommandSiteLocation(null, CommandSiteLocationType.Menu);&lt;BR /&gt;CommandSite toolbarCmdSite = new CommandSite("TestCommand.Menu", "Add New TestCommand Menu");&lt;BR /&gt;toolbarCmdSite.DeployAsPulldownMenu = false;&lt;BR /&gt;toolbarCmdSite.Location = testToolbarCmdSiteLoc;&lt;BR /&gt;toolbarCmdSite.AddCommand(bollegraafAboutCommandItem);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2020 14:07:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/programmatically-create-custom-toolbar-to-hold-custom-extensions/m-p/9295409#M5990</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-04T14:07:47Z</dc:date>
    </item>
  </channel>
</rss>

