Hi all, im trying to get the parameter type based on the elements and parameter name.
I had tried to design a design script based on that function but it seems to not work?
The line above [Imperative] is used to test on whats wrong with the script.
elements[0][0];
ParaName[0][0];
count = DSCore.List.Count(elements);
elements[0].ParameterByName(ParaName[0]);
[Imperative]
{
x = 0;
y = [];
while (x<count)
{
a = 0;
for (ele in elements[x])
{
y[x][a] = ele.ParameterByName(ParaName[x]).ParameterType;
a = a + 1;
}
x = x + 1;
}
return = y;
};
Unfortunately, i cant share with you the link or dyn file as the other portion contains confidential information about the company im working at. But to give you a better understanding of what is being fed in. i will attached some screenshot of it
But i suspect is something to do with the input list.
Below is the actual code
elements;
ParaName;
count = DSCore.List.Count(elements);
[Imperative]
{
x = 0;
y = [];
z = [];
while (x<count)
{
a = 0;
for (ele in elements[x])
{
z[x][a] = ele.Parameter.ParameterByName(ParaName[x]);
y[x][a] = z[x][a].Parameter.ParameterType;
a = a + 1;
}
x = x + 1;
}
return = y;
};
Don’t jump into imperative functions, and stick with basic design script here. Feed it line by line and then you will find the issue.
If I had to guess, you have a namespace collision issue with multiple custom nodes sharing the parameter namespace, and because you’re calling them in a function you’re missing the error message.
Thought so… but many users write one thing meaning another. In your case you only want to add a new type of a family, you don’t want to edit the family as such. But it could have been the case that you wanted to open the families resident in a project, and then tweak the families before loading them back again into the project…