Adding Thumbnail to Datasheet.xaml

Adding Thumbnail to Datasheet.xaml

richterBKSAC
Advocate Advocate
914 Views
12 Replies
Message 1 of 13

Adding Thumbnail to Datasheet.xaml

richterBKSAC
Advocate
Advocate

Hi there,

 

I'm using Vault Professional 2023 and been following this guide to learn more about the vault customization https://www.autodesk.com/support/technical/article/caas/tsarticles/ts/5EqwJIdJ3Yp6tTCLqSgjMg.html

When I add the Thumbnail to the Datasheet.xaml Vault won't display the Image after restarting.

I've added an additional row and added this line of code:

<Image Source="{Binding Prop[Thumbnail].Value}" Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="2" Stretch="UniformToFill" />

Is there anything I missed?

 

Thank you in advance 

0 Likes
Accepted solutions (1)
915 Views
12 Replies
Replies (12)
Message 2 of 13

Markus.Koechl
Autodesk
Autodesk

Sure, you miss something; but it is guessing based on the information provided.

First - I recommend switching to the latest documentation for Vault Data Standard 2023 Update 2 and newer versions. Download the documentation using this link: Vault Data Standard Tutorial - Downloads and Readme (autodesk.com)

If you continue having the issue, please share the customized XAML file.



Markus Koechl

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

Lars_A1
Contributor
Contributor

Hi,

unfortunately, I'm having the same problem with Vault Professional 2024. When I add the line as suggested, nothing happens. I'm quite sure the changes are in the right file, because the rows, whicht I commented out, disappeared.

 

I tried to attach my Datasheet.xaml, but I got an error message. Nevertheless, here is the part of the code, where the changes took place:

  • added line 8
  • commented out line 20-23
  • added line 24

 

<Grid ToolTip="{Binding UIString[LBL73], FallbackValue='General Properties'}" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" Margin="5,0,0,0">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="auto" />
                <RowDefinition Height="auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="1*" MinWidth="120" />
                <ColumnDefinition Width="2*" MinWidth="140" />
            </Grid.ColumnDefinitions>
            <Label Content="{Binding UIString[LBL8], FallbackValue=Category}" Grid.Column="0" />
            <TextBox Text="{Binding Prop[_XLTN_CATEGORY NAME].Value}" x:Name="Cat" Grid.Column="1" Margin="0,1" />
            <Label Content="{Binding UIString[LBL19], FallbackValue=Name}" Grid.Column="0" Grid.Row="1" />
            <TextBox Text="{Binding Prop[_XLTN_NAME].Value}" Grid.Column="1" Grid.Row="1" Margin="0,1" />
            <Label Content="{Binding UIString[LBL4], FallbackValue=State}" Grid.Column="0" Grid.Row="2" />
            <TextBox Text="{Binding Prop[_XLTN_STATE].Value}" Grid.Column="1" Grid.Row="2" Margin="0,1" />
            <!-- <Label Content="{Binding UIString[LBL33], FallbackValue=Date Created}" Grid.Column="0" Grid.Row="3" /> -->
            <!-- <TextBox Text="{Binding Prop[_XLTN_DATE VERSION CREATED].Value}" Grid.Column="1" Grid.Row="3" Margin="0,1" /> -->
            <!-- <Label Content="{Binding UIString[LBL34], FallbackValue=Created By}" Grid.Column="0" Grid.Row="4" BorderThickness="1"  /> -->
            <!-- <TextBox Text="{Binding Prop[_XLTN_CREATED BY].Value}" Grid.Column="1" Grid.Row="4" Margin="0,1"  /> -->
            <Image Source="{Binding Prop[Thumbnail].Value}" Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="2" Stretch="UniForm" MaxHeight="240" MaxWidth="360" />
        </Grid>

 

 

Versions:

Autodesk Vault Professional 2024 - Build 29.1.83.0 - 2024.1 Update

Autodesk Vault Data Standard 2024 - Build 29.1.83.0 - 2024.1 Update

 

Kind regards,

Lars

 

0 Likes
Message 4 of 13

Markus.Koechl
Autodesk
Autodesk
Accepted solution

I successfully validated the two steps in my en-US Vault environment 2024.1: Add another row and the image control to the .\File\Datasheet.xaml definition.

There are two possible mistakes:

  • Use a multi-language binding: Prop[_XLTN_THUMBNAIL].Value if your Vault database language is other than en-US
  • Suppose you copied the Datasheet.xaml file to the Vault.Custom\Configuration\File\ subfolder but none of the other customization files (Chapter 07 of the tutorial expects that you either completed the exercises before or extracted the files from Chapter 07 - Start.zip file.

 



Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
Message 5 of 13

Lars_A1
Contributor
Contributor

Your first point is nice to know, but unfortunately it didn't make a difference.

For your second point: Your partly right. I didn't follow the instructions in a linear fashion, I just picked out the things that were relevant to me. Now, I compared the files from the tutorial folder with my versions and didn't find a significant difference.

Because this has not put me on the right track yet, I deleted my Vault.Custom folder and inserted the start folder and the edited files from chapter 7. When I start Vault afterwards, the CAD BOM and both Datasheet tabs are completely empty.

 

I added my Vault.Custom folder as zip. Maybe you can test and verify my edits in your test environment.

0 Likes
Message 6 of 13

Markus.Koechl
Autodesk
Autodesk

Hi @Lars_A1, your Vault_Custom files work as expected in my environment. I had to remove the security block from the zip as usual. Empty tabs are likely a result of a blocked Powershell script.



Markus Koechl

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

Lars_A1
Contributor
Contributor

Thank you very much for your help @Markus.Koechl! At least I know now, that it's not my code, which is causing the problem. Do you have any idea how I can proceed with troubleshooting? I'm not familiar with powershell scripts and do not know how to check, if some scripts are blocked.

0 Likes
Message 8 of 13

Markus.Koechl
Autodesk
Autodesk

If you removed the security block for the tutorial sample files like shown below, it should work:

MarkusKoechl_0-1692784853798.png

If it does not, you must involve your IT to enable the PowerShell script execution policy. But, if the default configuration works and the customized one does not, you either need to remove the security block or check the user permissions for the Vault.Custom folder tree.



Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
Message 9 of 13

Lars_A1
Contributor
Contributor

I removed the security block and the tutorial scripts work now, but I still can't see the thumbnail.

I will contact our IT department and ask them for help.

Thank you very much for your fast answers!

0 Likes
Message 10 of 13

Lars_A1
Contributor
Contributor

I actually found the error by accident. The fields for state and category were empty as well. I then changed the property names to the German versions, as they are shown in the properties grid. There is a weird mix between English and German, but mostly the German names are shown. Can't tell you why, because both the server installation and the client are in English. To use the German names, even if the installation is in English, I edited the PropertyTranslations.xml, but it should also work with editing the Datasheet.xaml.

I found the German property name for Thumbnail (Miniaturansicht) in the PropertyTranslation.xml in the de-De folder.

 

Now, everything works as expected.

Message 11 of 13

Markus.Koechl
Autodesk
Autodesk

I am glad to read that you got it working. However, I think you should clean up the language mix. Vault Data Standard has a setting Vault\DSLanguages.xml. If your database is English and your clients are any other language, you need to add en-US to the DB attribute: 

<?xml version="1.0" encoding="utf-8"?>
<DSLanguages>
	<!-- The following two lines allow you to change the language (e.g. de-DE for German) for the UI and the Vault DB separately -->
	<!-- If no language code is specified the Vault Explorer language is used for the UI and the Vault DB -->
    <Language_Code ID="DB">en-US</Language_Code>
    <Language_Code ID="UI"></Language_Code>
</DSLanguages>

This setting will read the en-US\PropertyTranslation.xml and the de-DE\UIString.xml if the client starts using the German language pack.

You find more information and a step by step guidance in the tutorial chapter 80.



Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
Message 12 of 13

richterBKSAC
Advocate
Advocate

Thank you both for your effort.

In my case using the multi-language bind Prop[_XLTN_THUMBNAIL].Value worked.

0 Likes
Message 13 of 13

m_hermann
Collaborator
Collaborator

For me 'Miniaturansicht worked' also 'Status', 'Erstellt von' and 'Eingecheckt'

 

Many thanks

0 Likes