Python - Can't get return value from Thread? Please help!

I’m having trouble returning values from a thread I create. Here is my script.

I’m trying to get the return from the Selection.SetElementIds() method (which selects elements within revit). This method works when calling it outside the thread; however, I cannot get it to work from within the thread.

I’ve read that it is common to use Queue to pass values from a thread; however, one of the modules is interfering with the python Queue module so I’m unable to test it.

Any help is greatly appreciated. Thank you in advance!

bump

I am admittedly not a Revit API expert but I assume this is related:

2 Likes

Thank you for the link Michael.

Yes I think the problem is that methods, like the method I was trying to use (SetElementIds), do not return any values.