Use the following lines of code: -
combobox.selectedItem = "com2";
Hope it helps!!!
Hi,Rajat Jain.Sorry maybe I mistake you.The combobox it's not a windows control.It's a custom property I set in the Property Tab Builder(It's a solidworks own tool).The combobox's type is list.It's looks like this:
And this code:
It works in solidworks application.After the code works,solidworks application's property edit page looks like this:
Sorry,my mistake.All pictures are example.I have set all the properties with custom properties.
My question is when I change property with code by this function swDoc.set_CustomInfo().
When it's a textbox like this:
The code works well.Textbox's value changed.But when it's a combobox like this:
The code works only the first time.The combobox's value changed.From the second time I used the code.The combobox's value never change.