SetParameter error: TypeError: Multiple targets could match: Set(str), Set(ElementId)

Hey everyone,

I have the task to set project paramters for the current Document.
What i did so far:

  1. Get the informations i need in 3 Lists

    • one list contains the elementID
    • one list contains the parameters i want to set
    • one list with the parameter values
  2. wrote a script that writes the parameter values in the right paramters to the right element. If i execute the script i get an error which said: “TypeError: Multiple targets could match: Set(str), Set(ElementId)”

I have no clue why i am getting this error because i used same script and it worked fine:

Greets
Dan

What it’s telling you is that one or more of your elements has a Parameter by the name your looking up that wants an ElementId as the value and not a string.

Check to make sure all of your elements have the Parameter with param type Text.

2 Likes

Hello @DanTheMan
in addition to @SeanP 's answer it will seem that you have null values in your Parameter values list

2 Likes

thanks so much

String from Object did the trick

I feel bad for opening the topic a again. :fearful: @c.poupin @SeanP

I worked on the script and after executing the script i got an error:

Warnung:IronPythonEvaluator.EvaluateIronPythonScript fehlgeschlagen.
Traceback (most recent call last):
File “”, line 38, in
AttributeError: ‘NoneType’ object has no attribute ‘Set’

It sets the Parameter for the first Element in the list and then i get this error

can someone help again? :disappointed:

hello
error indicates that a parameter with the given name was not found for this element

2 Likes

thanks for the hint. Found the problem.

  1. writes the parameters and takes this as an Input
    image
  2. set the parameters and takes this as an Input
    image
    of courese i changes the excel

idiot :man_facepalming:

1 Like