Hello,I‘m test some more complex scripts,I found myself stuck at this,I make a simple one to demostrate my problem.here’s screenshot and the dyn file.
combine mutiple lists.dyn (38.7 KB)
If I get any help,I would appreciate it.
Hello,I‘m test some more complex scripts,I found myself stuck at this,I make a simple one to demostrate my problem.here’s screenshot and the dyn file.
combine mutiple lists.dyn (38.7 KB)
If I get any help,I would appreciate it.
Thank you for your reply,I want to know how to combine two list(with false boolean) into one,your answer is is kind of like replacebycondition node,I’ve tried successfully using String.Concat node,but it’s not very smart way to combine two list into one.
what is your expected result?
What I want is combine multiple lists(which have false value in it)into one list.
I have done it by the node String.Concat but I don’t think it’s a good way.
combine mutiple lists.dyn (38.7 KB)
Hello, a possibility in this way
List_A;
List_B;
K=DSCore.List.Count(List_A);
rep=[];
[Imperative]
{
for (i in 0..K-1)
{
if (List_A[i]==false)
{
rep[i]=List_B[i];
}
else
{
rep[i]=List_A[i];
}
}
return rep;
};
Cordially
christian.stan
Thank you very much,it works!!
But I also wonder what if there has more than two lists?
by adding ifs but Mr. Vijay’s solution is more efficient, we must dig in this direction, I think
Cordially
christian.stan
Thank you ,actually I tried “remove if not” node,it doesn’t generate the result I want,I should explain my proble more accurate.It’s like this,the value actually should stay at their index.
combine mutiple lists.dyn (49.4 KB)
Thank you,I should understand list more.
I think the solution comes more from Mr. Vijay’s analysis than mine
cordially
christian.stan