I created a custom node to do 6 tasks in order:
1- Crop view by room boundary.
2- Unhide and hide rooms.
3- Create a view list.
4- Rescale views to fit inside a certain boundary on a sheet.
5- Place views on sheet by point.
6- Export the sheet to an image.
Work still under progress but the level views node work perfectly when it’s used outside the custom node but inside the custom node it only gives the first item and the rest is not give or null.
It would be a great help if someone can help me with the issue.
very likely has to do with the type annotation of the inputs on the custom node:
do you want it to accept lists, items, lists of lists? - you can annotate the type to give Dynamo a clue how to replicate the custom node over different inputs, like SomeInput:var[]…[] - this will not replicate - this will SomeInput:string
The custom node first input receive 1 item a (room) , the second input receive list of rooms (array)
Then level is extracted from the first room input, level output connected to level views to get all view associated with that level.
The level views node works fine if I used it outside the custom node but when I embed it within the custom node it doesn’t work.
The rest of the nodes works well the only issue is with the level views node
(note that when you create a customNode you are really creating a function, and the inputs to the custom node are arguments to the function) so the type annotations and explanations on this page are related to how your custom node is replicated over lists of data - or not replicated.
and
Yes, I’m aware that I’m creating a function by creating a custom node, that’s the point so i can use it later on a list instead of only on one item , I specified the inputs and annotated them as a room element and the output is the sheets being exported to pictures.
But not able to troubleshoot the issue, i created custom nodes before and started to use python also within dynamo but still practicing
Looking this over, it seems as if it would be best run in the regular workspace environment instead of the custom node environment. I recommend you look into levels and lacing to get the correct performance as it will make building this much easier, as there are some methods used that may make this behave somewhat erratically, and tailoring stuff buried in a custom node to the various projects isn’t fun. I’ll see if I can track down the issue all the same.