Error at Sheet creation

I have created a dynamo to create multiple sheets and place the view in it. it is working perfectly when I am not using data shape nodes. Getting errors when I use the data-shape node to select the views. Errors related to sheet number. I don’t understand the relation between the data-shape node and the sheet number. Because data-shape node using to select the views only.

image
sheat creation 2022.dyn (48.9 KB)

There is no relationship. It just means that your method has changed. What are you providing when you don’t use Data-Shapes? What does the selection with Data-Shapes translate to? You can’t have duplicate numbers so at some point you’re having duplicates.

I am using data-shape nodes to select the views only. but when I use data-shape nodes, the sheet number error appears. Otherwise, script is pereffectly working

But what does that mean? We don’t know what your script is doing besides creating views. What views are you selecting? Why do you select views (that presumably already exist) to create new ones? What information are you feeding your script that differs between the Data-Shapes nodes and something else?

It would also be helpful to see both graphs in action, with all node preview bubbles pinned, so we can see what’s happening in both situations.