Community
Vault Customization
Share your knowledge, ask questions, and explore popular Vault API, Data Standard, and VBA topics related to programming, creating add-ins, or working with the Vault API.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Data Standard Use RadioButton

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
fsanchou
421 Views, 2 Replies

Data Standard Use RadioButton

Hello,

 

I have create  2 RadioButton (Yes/No).

<RadioButton x:Name="RB_YES" Content="Yes" GroupName="GROUP_RB" />

<RadioButton x:Name="RB_NO" Content="No" GroupName="GROUP_RB" />

 

How can I "link" this RadioButton with an Inventor's iProperty and write "Yes" or "No" in this iProperty?

 

Thanks

 

 

 

 

 

2 REPLIES 2
Message 2 of 3
marco.mirandola
in reply to: fsanchou

Hi, this is not trivial unfortunately. RadioButtons uses the IsChecked property in order to signalise which option has been set. Now, if you bind all the RadioButtons to the same property, you'll end up having either all buttons checked or unchecked. This means you have to bind the IsChecked to different properties. Then you can subscribe the OnPropertyChanged Event of each property and depending on which property is set you can finally fill up the property you want. This is messy!

Frankly i never used radio buttons, because if it's a pure yes/no then i use a CheckBox and bind the IsChecked to my property.
If i have several options, then i prefer a combobox. It's smaller and at the end you pick just one of the options anyway.
RadioButton are interesting only for multiple choice, but even there a combobox with checkboxes might be an alternative.

i hope this helps

ciao
marco

coolOrange
www.coolorange.com
Message 3 of 3
fsanchou
in reply to: marco.mirandola

Marco,

 

I also work around the problem by using a combobox.

 

Thank,

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

Post to forums  

Autodesk Design & Make Report