'Select Model Element' problem in 'custom node'

Hi everyone,

I have a problem.
I have a simple cube (mass) in the Revit project and wanna work on it in Dynamo.
When I use ‘Select Model Element’ node in the main Dynamo script it works, but I need to use it in a custom node I’ve created.
The problem is, when I want to use it in the custom node, it is freeze and doesn’t work.
I would appreciate it if somebody could help me to solve this problem.


Hi, what you want to do is to search for a “input” node and put it in your custom node and use a select model element node in the “main script” if you will.

1 Like

@jostein_olsen Thanks for your response,
sorry because of the delay, I had problems with the internet connection during the last days!
I have done what you said before, and I did it again.
Since it is a part of an optimization procedure, I get some errors in there, I asked from the publisher of Optimo about the problem and he suggested to put all the inputs in the custom node, and when I do that I have the problem which I mentioned before.
Actually, because of the next steps, it is better that I do it in the way you suggested.
Any idea how I can fix the problem with Optimo?

Hi Hamid!
I think you will have to share the content of your custom node as well, as it seems that the custom node is your problem. It would also help tremendously if you could share the file .dyn/.dyf file also so that we can help you without rebuilding form scratch! :slight_smile:

Hi @jostein_olsen

Thank you very much for your support and time.
I attach both main script and the custom node.

OptimiationWorkflow.dyn (13.9 KB)

ObjectiveFunction.dyf (14.2 KB)

Putting the Select.Element node directly in a custom node definition is not going to work since it waits for an input by the user in the Revit environment to update - and that cant occur once its been packaged. You need to place an Input node inplace of Select.Element in your custom node, and instead place the Select.Element in your model graph and wire it into the respective input in your custom node.

EDIT: Just saw @jostein_olsen earlier response, explaining exactly the above

Thanks @Thomas_Mahon
If I can solve the problem of Optimo, as I mentioned before, it is even better for my next steps to put select.element node out of the custom node.
I hope we can find a way here.
Thanks again.