Cancel
Showing results for 
Search instead for 
Did you mean: 

Writing attribute in Sublist

Valued Contributor
Valued Contributor

Hi everyone,

 

I have a problem with my sublist.

 

I created a Attribute for equiping the single procs. Now I need a secound Attribute but just for the BEs that are red because some single procs only have to equip if the color is red.

If I try to use the same code the first one is deleted... Can someone help me?

 

for var i:=1 to skids.yDim loop
if skids [5,i] /= "" then    
  skids.erzeugeSubliste(4,i);   
  skids[4,i] [1,1] := "Color";  
  skids[4,i] [4,1] := skids[5,i] 
end;
next

 

for var i:=1 to skids.yDim loop
if skids [5,i] = "red" then    
  skids.erzeugeSubliste(4,i);   
  skids[4,i] [1,2] := "Color2";  
  skids[4,i] [4,2] := skids[5,i] 
end;
next

12 REPLIES

Re: Writing attribute in Sublist

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
just remove

skids.erzeugeSubliste(4,i);

in the second loop
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Writing attribute in Sublist

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

If this is part of the same method, then the second loop will overwrite the first. The question is: what are you trying to achiev?


Gert Nomden
Senior Consultant | Tecnomatix Product Manager
cardsplmsolutions.com

Re: Writing attribute in Sublist

Valued Contributor
Valued Contributor

I have different singleprocs and all of them have to equip if the color changes. But there is one in the row that only have to change by the color black so I need a second attribute for this one exception.

 

The solution from Steffen works but the singleproc does not accept the way I tried to modify my sublist and if I replace the attribute color with color2 than all the other singleprocs does not work...

 

Is there any other solution?

 

Re: Writing attribute in Sublist

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

What is this kind of process? With the latest version, you have product-dependent assembly tables in the Assembly object.


Gert Nomden
Senior Consultant | Tecnomatix Product Manager
cardsplmsolutions.com

Re: Writing attribute in Sublist

Valued Contributor
Valued Contributor

Thank you Steffen the solution works but my simulation does not exapt that the attribute is in the secound row...
But I also cannot replace the Attribute in row one because in this case the other singleprocs do not work...
Do you have any advice for me?

Re: Writing attribute in Sublist

Valued Contributor
Valued Contributor

The simulation is about a Painting line. So my singleprocs alway have to equip if the color changes. But one of it only has to equip by a special color...

Re: Writing attribute in Sublist

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

is there an error message?

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Writing attribute in Sublist

Valued Contributor
Valued Contributor

Yes.

If I start the simulation it tells me that the attribute is unknown and the singleproc cannot euqip because it needs a attribute "Color2" with the data type string

Re: Writing attribute in Sublist

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
if you use it for setup, you need to define color2 in each MU (not only in the red ones)

e.g.

for var i:=1 to skids.yDim loop
skids.erzeugeSubliste(4,i);
skids[4,i] [1,2] := "Color2";

if skids [5,i] = "red" then
skids[4,i] [4,2] := skids[5,i] ;
end;
next;
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net