Cancel
Showing results for 
Search instead for 
Did you mean: 

Adding Object to TxObjEditCtrlBox

Valued Contributor
Valued Contributor

Hello All,

 

I want to add a component to TxObjEditctrlBox by button command(Not by Pick event). It should be worked as  first , i select any component and then click button, so at the end the cmponent should be added to box. Can u give me some suggeston regarding code and property for TxObjEditctrlBox?.  I attached a pic here.

2 REPLIES

Re: Adding Object to TxObjEditCtrlBox

Phenom
Phenom

Hello @Vaghniku

 

1 - In the button click event, you should collect selected item by TxApplication.ActiveSelection.GetAllItems(). If you're sure about only one selection, you can follow like ITxObject obj = list[0] ("list" is the TxObjectList resulting from GetAllItems command);

 

2 - After that, assume the property "Object" of your TxObjEditBoxCtrl object = obj (the object filtered in item 1)

 

Can you try and see if it works?

Re: Adding Object to TxObjEditCtrlBox

Valued Contributor
Valued Contributor

Hi @FredCastro,

 

Thanx for giving ideas. I will try n then update.

 

Thnx