Data Standards 2017 Issue with Context Menu

Data Standards 2017 Issue with Context Menu

dsmith
Advocate Advocate
989 Views
6 Replies
Message 1 of 7

Data Standards 2017 Issue with Context Menu

dsmith
Advocate
Advocate

Hi All

 

I am trying to add a context menu item to Items using Data Standards

 

Location="ItemContextMenu" stops the whole context menus being created and in the datastandardvaultlog.txt I get

 

2017-01-08 21:35:01,631 [1] FATAL dataStandard4Vault.dataStandardExtension - CommandSites failed with exception
System.NullReferenceException: Object reference not set to an instance of an object.
   at Common.UiStringExtensions.Localize(String key)
   at myMenu.Config.XmlConfigReader.LocalizeNavigationTypes(CommandSite cmdSite)
   at myMenu.Config.XmlConfigReader.GetSitesAndCommandsFromMenuConfig()
   at myMenu.Config.ConfigReaderDecorator.GetSitesAndCommandsFromMenuConfig()
   at dataStandard4Vault.dataStandardExtension.CommandSites()

 

if I use Location="FileContextMenu" all works fine.

 

Does anyone have a clue?

0 Likes
990 Views
6 Replies
Replies (6)
Message 2 of 7

Markus.Koechl
Autodesk
Autodesk

There might a syntax error. Compare with this example, that works: I added a custom command "reserveNumbers".

In the section MenuItem the addition is:

    <!--ReserveNumbers Menu item start-->
    <ReserveNumbers Label = "$UIString[ADSK-RSRVNUMBERS_MNU20]" Description = "$UIString[ADSK-RSRVNUMBERS_MNU20]" Hint = "$UIString[ADSK-RSRVNUMBERS_MNU20]"
      PSFile = "ReserveNumbers.ps1" Image="ReserveNumbers.ico" ToolbarPaintStyle = "TextAndGlyph"
      MultiSelectEnabled = "false"/>
    <!--ReserveNumbers Menu item end-->

In the command site section I added:

    <ItemContext Label="myMenu" DeployAsPullDown="False" Location="ItemContextMenu">
      <Item Name="ReserveNumbers"></Item>
    </ItemContext>

The result is as expected:



Markus Koechl

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

Markus.Koechl
Autodesk
Autodesk

There might a syntax error. Compare with this example, that works: I added a custom command "reserveNumbers".

In the section MenuItem the addition is:

 

1-9-2017 8-25-15 AM.png    <!--ReserveNumbers Menu item start-->
    <ReserveNumbers Label = "$UIString[ADSK-RSRVNUMBERS_MNU20]" Description = "$UIString[ADSK-RSRVNUMBERS_MNU20]" Hint = "$UIString[ADSK-RSRVNUMBERS_MNU20]"
      PSFile = "ReserveNumbers.ps1" Image="ReserveNumbers.ico" ToolbarPaintStyle = "TextAndGlyph"
      MultiSelectEnabled = "false"/>
    <!--ReserveNumbers Menu item end-->

In the command site section I added:

    <ItemContext Label="myMenu" DeployAsPullDown="False" Location="ItemContextMenu">
      <Item Name="ReserveNumbers"></Item>
    </ItemContext>

The result is as expected:



Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
0 Likes
Message 4 of 7

Markus.Koechl
Autodesk
Autodesk

There might a syntax error. Compare with this example, that works: I added a custom command "reserveNumbers".

In the section MenuItem the addition is:

 

 

    <!--ReserveNumbers Menu item start-->
    <ReserveNumbers Label = "$UIString[ADSK-RSRVNUMBERS_MNU20]" Description = "$UIString[ADSK-RSRVNUMBERS_MNU20]" Hint = "$UIString[ADSK-RSRVNUMBERS_MNU20]"
      PSFile = "ReserveNumbers.ps1" Image="ReserveNumbers.ico" ToolbarPaintStyle = "TextAndGlyph"
      MultiSelectEnabled = "false"/>
    <!--ReserveNumbers Menu item end-->

In the command site section I added:

    <ItemContext Label="myMenu" DeployAsPullDown="False" Location="ItemContextMenu">
      <Item Name="ReserveNumbers"></Item>
    </ItemContext>

The result is as expected:



Markus Koechl

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

Markus.Koechl
Autodesk
Autodesk

There might a syntax error. Compare with this example, that works: I added a custom command "reserveNumbers".

In the section MenuItem the addition is:

 

 

    <!--ReserveNumbers Menu item start-->
    <ReserveNumbers Label = "$UIString[ADSK-RSRVNUMBERS_MNU20]" Description = "$UIString[ADSK-RSRVNUMBERS_MNU20]" Hint = "$UIString[ADSK-RSRVNUMBERS_MNU20]"
      PSFile = "ReserveNumbers.ps1" Image="ReserveNumbers.ico" ToolbarPaintStyle = "TextAndGlyph"
      MultiSelectEnabled = "false"/>
    <!--ReserveNumbers Menu item end-->

In the command site section I added:

    <ItemContext Label="myMenu" DeployAsPullDown="False" Location="ItemContextMenu">
      <Item Name="ReserveNumbers"></Item>
    </ItemContext>

The result:



Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
0 Likes
Message 6 of 7

Markus.Koechl
Autodesk
Autodesk

There might a syntax error. Compare with this example, that works: I added a custom command "reserveNumbers".

In the section MenuItem the addition is:

 

 

 

    <!--ReserveNumbers Menu item start-->
    <ReserveNumbers Label = "$UIString[ADSK-RSRVNUMBERS_MNU20]" Description = "$UIString[ADSK-RSRVNUMBERS_MNU20]" Hint = "$UIString[ADSK-RSRVNUMBERS_MNU20]"
      PSFile = "ReserveNumbers.ps1" Image="ReserveNumbers.ico" ToolbarPaintStyle = "TextAndGlyph"
      MultiSelectEnabled = "false"/>
    <!--ReserveNumbers Menu item end-->

In the command site section I added:

    <ItemContext Label="myMenu" DeployAsPullDown="False" Location="ItemContextMenu">
      <Item Name="ReserveNumbers"></Item>
    </ItemContext>

The result: 1-9-2017 8-25-15 AM.pngIn case of doubt, share your menudefinitions.xml to have a look at.



Markus Koechl

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

dsmith
Advocate
Advocate

this hotfix solved the problem

 

Autodesk Vault Data Standard 2017.0.1 Fixes

0 Likes