Cancel
Showing results for 
Search instead for 
Did you mean: 

How to copy data (TxObjGridCtrl)

Creator
Creator

Hi everyone,

 

i'm trying to copy some operations (vialocs) from one TxObjGridCtrl to another.

It is my first time to write some code for tecnomatix so pls be gentle if my problem is too ordinary Smiley Wink

 

Example:

I've got some vialocs in grid1 and I need the accelaration of each vialoc in grid2 in the same order (transfer by using a button).

 

Any ideas how to realize it? Maybe with some code for me to understand Smiley Wink

 

Thanks

Jan

6 REPLIES

Re: How to copy data (TxObjGridCtrl)

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi JanOle,

 

Use the Objects property of TxObjGridCtrl to get the list (TxObjectList) of operations that are populated in the first grid.

Then for each operation calculate the acceleration and populate it in the second grid.

 

Best Regards,

DianaG

Re: How to copy data (TxObjGridCtrl)

Creator
Creator

Hi DianaG,

 

thanks for your answer.

 

I used

TxObjectList operation_list = List_Operations.Objects;

to get the operations. (List_Operations = TxObjGridCtrl1)

I can show every single operation with MessageBox but now I don't know how to write the content (or even the name) in the second grid. How can I populate them in the 2nd one?

 

Best Regards,

Jan

Re: How to copy data (TxObjGridCtrl)

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi JanOle,

 

How many columns does the second grid have? How do you Init it?

There is a method SetTextValue(int nRow, int nCol, string val)

 

Best Regards,

DianaG

Re: How to copy data (TxObjGridCtrl)

Creator
Creator

It's just a second TxObjGridCtrl in the Windows Form.

I'll try your method tomorrow and then write again Smiley Wink

 

Thanks a lot Smiley Happy

Re: How to copy data (TxObjGridCtrl)

Creator
Creator

Hi again,

 

I've tried it yesterday but it didn't work...

There are some other ideas I check today and i'll give a feedback when done.

 

Best regards

Jan

Re: How to copy data (TxObjGridCtrl)

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi JanOle,

 

Does the second grid need a column that supports pick, column where you can pick model objects from the application?

If the second grid does not need such column, if you only need to display static text there,  you can use a regular System.Windows.Forms.DataGridView.

The TxObjGridCtrl is designed to always have a pick (green) column that is populated with model objects(parts, resource, operations, etc.).

 

Best Regards,

DianaG