Showing results for 
Search instead for 
Do you mean 
Reply

Changed information from another table

Hi

I have that situation:
I have excel file with information about:

-part name,

-number of parts,

-part length,

-part width

Then I use init method: “Order.readExcelFile("D:\Order.xls")” to load information  from excel

Now when I press start I would like to create information in new table. Where I will have changed information from table 1:

- Part name,
- Number of parts,

- Field (length*width) 

- another information using method if

And when I start the process I want create MUs with specified dimensions (length and width)

Thanks in advance

4 REPLIES

Re: Changed information from another table

So you read the Excel file in your Table "Order" and want to modify an existing table with:

 

- Part name,
- Number of parts,

- Field (length*width) 

 

what do you mean with " another information using method if"?!

 

You can write a method which is called by init Method:

 

is

do

 

for local i:=1 to order.ydim loop

 

DataTable ["Part name", i] := Order["Part name",i];

DataTable ["Number of Parts", i] := Order["Number of Parts",i];

DataTable ["Field", i] := Order["Part Length",i] * Order["Part Width",i];

 

next;

 

end;

Re: Changed information from another table

Thank you very much. 

With method "if" I mean, if I have some value from


DataTable ["Field", i] := Order["Length",i] * Order["Width",i];

So now I need in this same table in next columne information

If "Field" > 0.1 then  
Value in next column = 2

else
Value in next column = 1


Regards

Re: Changed information from another table

So you have to add this after you calculate the Field

 

if DataTable ["Field", i] >0.1

    then DataTable ["Field Add Information", i] := 2

    else DataTable ["Field Add Information", i] := 1

end;

Regards

 

 

Re: Changed information from another table

Great. Thank you.

When I start process and I want create automatically new part in MUs with length and width indicated in the table. Is any commend for this?

Regards