Views Position on Sheets with Scope Boxes

I’m trying to make a script that will create views give them a scope box and place them on sheets. So far I’ve been able to duplicate our base view, rename it, and give it a scope box. I’ve also created sheets using our base sheet for naming and placed the new view on the new sheet. I’m having issues getting the view to be placed on the correct position on the sheet. I used 0,0,0 as the location and it seems like it is using the center of the entire model. I have 8 scope boxes and some of them are rotated so every view I place is not on the sheet. When I used “View.ViewPortBoxCenter” to see what the locations were I was getting numbers like -3.256, 2.45 and -2.78, 0.28. These looked to be accurate to where they were placed assuming that the center of the sheet is 0, 0. I then tried “Viewport.SetBoxCenter” to correct this to 0,0. Now the views read 0,0 but appear to be in the same incorrect locations that they where before. I think this script is already useful but I want to get this last problem fixed before I try to make it more automated. In the screen shot below I have a value of 6 just to see what would happen. It appears to change nothing.

center%20view%20problem%2002

View Sheets.dyn (40.1 KB)

1 Like

did you try this approach?

image

i was try something like this. hope you get help.

https://drive.google.com/open?id=1g1ZRaqLQeGrtiwcjR1Q8cW0gLRvFUIbh

I either don’t understand how this works, or something else is wrong. On the left I have a template sheet and view and on the right I still have the view off to the side. I used sheets and selected my template sheet. I also used Views before this and selected the template view. Same issue.

You feed it Viewports where it wants Sheets

1 Like

I’ve changed the sheets to the one’s I created. I’ve used “sheets”, “views” with the template view, and “views” with the template sheet for the template sheet input and it still hasn’t fixed the issue.

maybe use a transaction.end node or a passtrough node, so it waits untill the sheet creation is done and starts aligning views after

1 Like

We’re getting somewhere. The views moved. However they are still off. In addition we also have coordinates again.

I don’t think align sheet node will work. First it isn’t aligning area A correctly which the template is based off of and all the sheets A-H have the view in different positions. I need to find a way to move the viewports so they are in the center of the sheet even if they have scope boxes which I think is the issue here.

When I use “View.ViewPortBoxCenter” it gives the same coordinates for each viewport even though each sheet has the view at a different location which tells me it is not finding the center of the viewport. It’s finding the center of the model. This means I would have to put in a different coordinate for each view.

Try the viewportalignment node in the Quasar package
Havent tried it myself but it might help.

1 Like

Thanks for the advice but that node has the same result as the other alignment node.

See if there is anything usefull in this.
Usualy the people of this forum dont do the work of others but i already had this made.

view_locations_align.dyn (6.4 KB)

I think I need to find the center of the scope box. would the solution in the thread work?

I then would have to find a way to use those coordinates and set them to the 0,0,0 of the sheet.

I’m having a similar issue. What I’m finding is that, for all of the great packages out there able to get the viewport location and move it, the actual bounds of the view are different. What I’m able to see is that despite each view having the same size crop either explicitly, or derivative of a scope box, the extenuating content of the view (annotation and such) will change the bound area of the viewport when placed on the sheet. Crop Box does not equal Viewport the latter of which is effectively random based on the view content (I’ve tested having all of the same annotation crops as well). Unless there is a package out there that can understand the location of the view’s crop boundary as visible through the viewport, it does not appear possible to locate the viewport with any accuracy on the sheet. I really hope I’m wrong on this since I’m not able to use python, so if there is anyone in the community that can show how this can be done I would love to hear it!

2 Likes

Has anyone work this issue out?

I am currently trying creating sheets and views by scope box but could not succeed. I am searching sth to find out

This is not the solution to the problem but it is a workaround that I tried out. I made a Metric Generic Annotation - Family with a square made of invisible lines. Then put it on in the views to stretch out the bounding box so it´s the same on every viewport that´s got this invisible square. This keeps the scope box as small as possible and the bounding box does not get effected by the sections or textnotes. But off course the downside is that this family needs to be at the same place in every view. Then I use this script with nodes from the Rhythm and Springs - Packages to align.
Align viewports .dyn (26.2 KB)


1 Like

Is there an update here? I also have the same problem I already have the script to place all the views on the sheets however the Viewport.SetBoxCenter doesn’t help with aligning the views in the same locations