I’ve been trying to dimension 60 or so views inside Revit using Grasshopper, but I’ve been running into a problem. When I try feeding multiple views into the Dimension-node, I get an error saying “The direction of dimension is invalid”. However, if I only feed the node a single view at a time, everything works fine.
The basic functionality of the graph is this:
1.) Get the crop region of a bunch of Revit views
2.) Turn the segments of the crop region into individual line segments for dimensioning
3.) Create an offset copy of the line segments for dimension location
My data tree should be fine, and the amount of views I pass through it should be irrelevant. Am I missing something about how the node works, or have I made a rookie mistake? It’s been a long day.
That’s embarassing, don’t know how I missed that! After matching the data trees I no longer get errors and the right amount of dimensions is created, but none of them are visible in Revit.
Turns out the created dimensions are abnormally long, but it does seem like they are correctly oriented along the right reference line. Any idea what might be going on? The lengths of the reference lines and location lines seem fine.
EDIT: I copied the nodes above into a new graph, and tested it on the default floor plan views of a new empty Revit project to see if my views are the problem, but the issue persists.
Sure thing! Here’s a fresh Revit 2023.1 file with two cropped floor plans and the GH script. Running the script results in the correct amount of dimensions, but none of them are visible in the plans. In Rhino or Revit’s 3D view you can see the GH preview lines for the dimensions though; they’re orientated correctly, but oddly long.
I got it to work! Turns out the dimension-node can only process branches with one item in any of the inputs? I saw another post with a related issue that mentioned duplicating the views - that seemed to do the trick.