I would like to input some property values programmatically instead of typing them in. I added a button to the Inventor dialog:
<Button Content="SetProperties" Command="{Binding PsCmd[SetProperties]}" Grid.Column="1" Width="80"/>
I added the function updating a hardcoded property to a hardcoded value:
function SetProperties { $Prop["Title"].Value = "test123" }
This is of course pointless. Have some fantasy here: someday the function will fetch values from another system or something. It will still be okay if the user changes them after fetching. Think of it as a kind of recommendation.
It works, too. The button causes the GUI to be updated and the value will be saved to the iProperty:
Unfortunately, it also murders the Category Property, which is set empty after I press my button (VDS_Category is empty after saving). So all is fine if I press first, choose category second. If I do it the other way round, I lose the Category. This is especially bothersome if I want to edit a file that has already been saved, since DataStandard will not let me switch the category in this case.
As far as I can see, VDS_Category is the only iProperty affected by this, all the others keep their values. Why is that?
Solved! Go to Solution.
Solved by Markus.Koechl. Go to Solution.
This is a known issue and should get solved in newer configuration defaults. Your action causes a full refresh of the UI and we need to prevent this for existing selections. Edit your XAML as documented in AKN article:
Search for ItemsSource="{Binding PsList[GetCategories]}" Replace the binding as shown below: ItemsSource="{Binding PsList[GetCategories]}" by ItemsSource="{Binding PsList[GetCategories], Mode=OneTime}"
Can't find what you're looking for? Ask the community or share your knowledge.