Dimension.ByElements node

There are A LOT of posts about automatic dimensions, only a handful about using the newer Dimension.ByElements node, but most of them are out-dated.

I used a very simple script with my testing model, only nine column lines, and there seems to be a bug.
The script will pull the column lines and place a zero dimension on each one. It is only when I try to drag them (usually takes two attempts) that the actual grid-to-grid dimension show up. I am only running this script on a floor plan view, the image below happens to show a 3rd level view.

Is this a flaw or do I need to add something?




This is because you’re selecting all elements of category and not sorting your grids by angle. They’re effectively dimensioning to themselves repeatedly. Select just the grids on the Y axis and you’ll get better results. In this example I selected all numerical girds (1…6) with the select model elements node, and then used the select model element node to get the alphabetical grid (A). Note that without wiring in the line I get good results:

Adding the grid.curve result as the line I get even better results (well depending on your definition of better).

Here it is in action:



I ran it your way and it does snap the dimensions in correctly, but places them directly on the second grid line selection. An offset node should remedy that part so they land properly…

Because Dynamo is a one and done operation, a second group has to be added to get both horizontal and vertical grids. This also takes four manual inputs to run it.

I was trying to keep the manual inputs down
Thanks for your input on this

1 Like

I think that you can actually remove all manual inputs if you want. Try something like this:

  1. get all grid elements.
  2. filter out curves grids (and yell at whoever tried to used them)
  3. get the grid curves.
  4. create a vector from the start and end point of each curve.
  5. Get the angle from the x axis to the vector about the z axis
  6. normalize that angle to the +y quadrants (angle>=180? angle - 180 : angle;)
  7. round the angles to the nearest reasonable number for the design.
  8. group the grid elements by this value.
  9. get a bounding box for each grid element and pull its maximum point.
  10. create a line by best though points for each group of grids. Offset this line by the desired offset distance towards the center of the model (or the minimum grid points). My distance would be based on the (view scale) * 12 so 4’ for a 1/4” = 1’-0” drawing. Metric and engineering scales I’m less comfortable with.
  11. strike a dim for each group of grids along the offset line.

The Grid.Curve node was found in another post

Seems like a lot of work for just some simple dimensions
Shouldn’t have to recreate more lines to accomplish this

Jacob, I learned a lot from this post. Thanks for what you do!
I am a Dynamo novice 3 weeks in a new job at a company eager to invest time in workflow efficiencies.

Sounds like Bill may not have been interested in mods to eliminate manual inputs.
I think I will likely attempt to implement your suggestions above. It will be a way to learn more.

Dabbled in Dynamo at previous job. I see more opportunities it apply it here.

1 Like

@ [gmiller

I am always interested in automation, that is why I use Dynamo in the first place. What is meant by your comment?

Thanks for the detailed narrative explaining how this could be accomplished.


Only meant that it didn’t sound like you were going to soon implement Jacob’s ideas to eliminate manual inputs and sharing your work. So I was considering trying myself.

I dont seem to be able to recreate this any advice on where I maybe going wrong?

Grid Dimensions Working.dyn (47.7 KB)

Im trying in a elevation but dimensions is positionate at the bottom