Showing results for 
Search instead for 
Do you mean 

Cuttiing and creating parts


I have 2 questions.
1. In some step of my process, I create some number of parts (all information about how muche are in table) but when I have first sheet method creat sum of all parts in table. What I'm doing wrong?

2. In order I have situation when I have e.g. 5 parts, every parts have length = 0,6 and width = 0,8, so the sum of the fields is 2,4m^2 and sheet field is 2m^2. And now I looking way to split it to 2 sheets . From firts sheet I will have 4 element and small rest and from second 1 element and rest. Any advices ?
Or is it possible to check that parts fit on the sheet? Because in example given above it's known that 4 parts 0,6x0,8m it's not possible cut form one sheet 2x1m



Re: Cuttiing and creating parts

[ Edited ]

In your outer loop ( for j:=1 to Datatable.ydim loop..)


you are looping through all rows until the last row of the datatable ( datatable.ydim)


If you just want to create "part_1" parts you have to insert some restriction between outer and inner loop



outer loop

 if datatable[2,j]="part_1" then .... 
         inner loop



Re: Cuttiing and creating parts

But if I don't know how muche rows with "part_x" I will have?

Re: Cuttiing and creating parts

with the posted restriction you are "just" filtering ALL  "part_x" according to your needs.


as through the outer loop you  are still looping through all rows of the datatable

Re: Cuttiing and creating parts

So now I have that method:

for  j:=1 to DataTable.ydim loop
	if datatable[1,j]="part_1" then
		for k:=1 to DataTable[2,j] loop
	 		part:= .MUs.Entity.create(Elements);

and this work only for "part_1", so what I should change?

I try that way

 		 if order.find( then
    		 local index : integer := Order.cursorY;
			 num_parts := Order["num_parts", index];
	if @.Name="Part_Nr_1" then
  			for i:=1 to num_parts loop
elseif ...

but here I will have a lot of "elseif" and I don't know how commends use to create part with name,width and length, because thouse frome 1 code doesn't works.



Re: Cuttiing and creating parts

1. What doesn't work in 1. code ?


2. What problem do you have using a couple of else if commands ?

     you can also use switch .. case