Hello, I thought that based on the dimensions of the View.Outline node (results in feet, indicated in the node), we would have the overall dimensions of the Viewport.
We need to add an offset of 0.01 feet along the entire outline to obtain the footprint of the windows (Viewport) to be placed.
Is my reasoning correct?
Can we obtain the future dimensions of the Viewport without placing the view?
From the ootb nodes (which part of the API should we touch, if not), can we access and/or send data?
thanks
cordially
christian.stan
Hi, I’m closing the topic:
The View class’s CropBox property allows you to get and set the cropped area.
The ViewCropRegionShapeManager class’s BottomAnnotationCropOffset property allows you to get and set the top offset.
Python script
import sys
import clr
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
v=UnwrapElement(IN[0])
ech=v.Scale
cm=v.GetCropRegionShapeManager()
OUT = ech,["Zone cadrée",str(round((v.CropBox.Max.X-v.CropBox.Min.X)*0.3048/ech*1000,0))+" mm",str(round((v.CropBox.Max.Y-v.CropBox.Min.Y)*0.3048/ech*1000,0))+" mm"],"Haut "+str((cm.TopAnnotationCropOffset)*0.3048*1000)+ " mm"
Thank you.
Sincerely,
christian.stan