Custome Node using get views bt level

Hello everyone,

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.

Thanks a lot

X.dyf (54.5 KB)

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

have you tried what I suggested?

I apologize, I’m not quite sure what you meant .

I’m new to dynamo, can you show me an example or a picture to what you was referring to


(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

http://dynamoprimer.com/en/09_Custom-Nodes/9-2_Creating.html

look carefully at the input nodes in the custom node that is created here.

another useful one:

Dear Michael,

Thanks for the help and being patient with me

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

List at level functionality and lacing could be another way to do this, and may be another road to get To the end goal.

In any case it would help people help you solve this issue if we had a dataset to work with. Can you post a sample Revit file for people to test on?

Sure, X Sample.rvt (1.7 MB)

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.

Thanks I will check those