Hello guys.
I’m sort of new to Dynamo for Revit.
Currently, I’m attempting to make a flow to dimension for one diameter by using Dynamo.
Before, I could make it for lines gaps which were converted from Dynamo Geometry (edges and lines) with “Dimension ByReferences” node from Genius loci (thanks a lot).
But this time, the experience didn’t help me.
As you can see in the attached images, (in dynamo capture) each input(view, line, references and dimensiontype) has data type (section view, line(Dynamo geometry), Autodesk.Revit.DB Reference, and DimensionType) and it’s the same situation as I successfully dimensioned line gaps with a same node(Dimension ByReferences) when it comes to DATA TYPE.
At first, I thought that the factor of this failure would be override setting, filters, or sth related to v/g but I found the result of the final node was “NULL” and then I’m confusing.
The problem is probably caused by the change of DimentionType from linear to diameter.
Does anybody have some idea?
For a personal reason, I use Revit 2021 on purpose and cannot change its version and I’m still a beginner and not confident whether I could judge that I should upgrade custom packages’ version to the latest one as well as I don’t use python script (began to learn it).
Sorry for that and I appreciate for your enthusiasm all the time.
You have to have at least two references to dimension to. Also, I’m assuming that your line startpoint is the centerpoint of the arc.
1 Like
Thanks @staylor for your prompt advise.
I’ve just tested putting two references (Arc) and setting line not on the center point of the arcs (pls tell me if this is not what you desired if you have time for me) but I still cannot even get a dimension as an output.
Maybe, I have to consider what kind of references I must choose (not two arcs but e.g. arc + referencepoint) with a diameter dimension type or think of other way to make it.
The Dimension ByReferences node will only accept linear Dimstyle. After reviewing, I don’t think you can pull a radial or diameter dimension in the project level anyway, but a linear dimension will serve the same purpose. If you only have one arc you will only get one reference. So to work around that you you have to use model lines placed at the points you want and pull the start point and end point references of those lines (you can use the code below for that). Then from that point it’s a matter of pulling the corresponding references and feeding those into your dimensioning node.
import clr
clr.AddReference("RevitAPI")
from Autodesk.Revit.DB import *
elements = UnwrapElement(IN[0])
for e in elements:
strtpt = e.GeometryCurve.GetEndPointReference(0)
endpt = e.GeometryCurve.GetEndPointReference(1)
OUT = strtpt,endpt
1 Like
Thanks for your code. As I used a project file(.rvt), I couldn’t make a ReferencePoint with a default nodes at first which shows me an error message “you can create it only in a family file” or something like this.
But this time, I could make a dimension referencing these two points and showing a value of a diameter as you can see it in the attached screen shot! (Fitting DimensionType(diameter) is another problem so I will make your message “Solution.”)
Couldn’t appreciate more @staylor.
Sincerely,
2 Likes