Community
Vault Forum
Welcome to Autodesk’s Vault Forums. Share your knowledge, ask questions, and explore popular Vault topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Vault Data Standard - Combo Box Linked

0 REPLIES 0
Reply
Message 1 of 1
masureb
379 Views, 0 Replies

Vault Data Standard - Combo Box Linked

Hello,

 

today, I've got this question: How can I link 2 combox box? The objective is to link a french material with and English Material for example.

14-03-2014 11-03-39.png

So I create an xml to get a table with the english and french material associated like this:

14-03-2014 11-08-03.jpg

My xaml looks like this to get the xml list in my combo box:

 <XmlDataProvider x:Key="myMaterial" Source="C:\ProgramData\Autodesk\Vault 2014\Extensions\DataStandard\CAD\Configuration\myMaterial.xml"/>

 

<ComboBox x:Name="Material_FRA" Grid.Column="1" ItemsSource="{Binding Source={StaticResource myMaterial}, XPath=/myMaterial/Material}" DisplayMemberPath="@FRA" SelectedValuePath="@FRA" SelectedValue="{Binding Prop[Material_FRA].Value}"/> 

 

I create an event in my PowerScript to get back the value.At this time I have no idea to get the value of the selectedindex.

# Event Material

$Prop

["Material_FRA"].add_PropertyChanged({

 

param($parameter, $source)

 

if($source.PropertyName -eq"Value") {

 

Material_Update_FRA}

})

$Prop

["Material_ENG"].add_PropertyChanged({

 

param($parameter, $source)

 

if($source.PropertyName -eq"Value") {

 

Material_Update_ENG}

})

 

# Update Material

function

Material_Update_FRA

{

$FRA=$Prop["Material_FRA"].Value

 

$Prop["Material_UPDATE"].Value =$FRA

}

function

Material_Update_ENG

{

$code=$Prop["Material_ENG"].Value

 

$Prop["Material_UPDATE"].Value =$code

}

 

So my questions are:

How can you get the selectedindex or do you prefer another method?

Do you have any sample to achive this?

 

Thanks,

-Bertrand MASURE

“https://damassets.autodesk.net/content/dam/autodesk/logos/autodesk-logo-primary-rgb-black-small_forum.png”
0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report