tell u what, this isn’t over. this was probably an attempt from around rvt 16, maybe even earlier. i remember vp/view manipulation within sheet space had some very interesting/weird issues. i haven’t checked on whether supports for sheet space has improved in newer versions like 25/26. so it’s best to keep problems within model space if possible.
a bit blah. this brings back some wonderful memories. i was staring at this blue frame for days back then. 10 years.., man im aging.
and another thing, check the title block if u see some weird numbers. where the sheet space (0,0) locates and etc. maybe the coords u get is in sheet space but looks odd because of some mysterious shift of the entire sheet.
tbh i’ve just tested it on my machine, everythin works fine. but my brain is the mud right now factoring in the time difference with u guys. lets try figure it out some other time if u want to.
Sooo, turns out my code is working… However, the issue is it’s aligning to the cropped area shown when I click on the view, not the crop region that’s outlined (1).
How do I get it to align to the crop region outlined?
1 - crop region outlined
2 - Annotation crop
3 - The actual box it’s aligning to (this is the one that appears when you click on the viewport on the sheet)
It looks like your coordinates for the crop box are not mapped correctly. Try building a set of views around a pipe from (0,0,0) to (10,5, 15) using a different bounding box for each. All bounding boxes should have a min point of (-1,-1,-1), and the max points should be every permutation of (7, 12, 17). Something like [[7,12,17],[7, 17, 12], [12,7,17], [12,17,7], [17, 7, 12], [17, 12, 7]]; in design script should suffice. Name the views by the bounding box’s max point as a string, and you will likely be able to identify which box you want to use, which will allow you to identify how to construct your box.
If I move my mouse over the view I get another box. #3 arrow pointing to it. And my script picks up the corners of this box and the corners of the other, “mouse over” boxes.
You need to the crop box from the “View” not the “Viewport” box outline.
Do watch out that the view crop box will probably be in a 3d space geometry and may not align with the viewport box outline. You may need to do some geometric adjustment to get them to overlay over each other.