
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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.