Adding dimension

Hi,

How to add text or dimensions of circle at each level.
Thanks.

can you please explain what you are trying to do? what do the dimensions of the “circle” represent? are you referring to the target of the level indicator?

Thanks for your reply!

I just wanted diameter of the circle at each level as the diameter is changing.

Thanks.

your request still does not make any sense. what does the circle represent? Please see this FAQ - How to get help on the Dynamo forums

hi @satishj013,

just make a plane at a specific level and get the intersection of that plane to your solid, the intersection is the area at that level.

-biboy

if i can understand, it seems a desire to change level target circle size to fit the text? don’t bother, find something with a greater value add to the project. that being said if you are being directed to figure this out, open the level target symbol and see how it is setup, then work out something and post images with notes or a test file, as noted above, there are best practices for getting help.

1 Like

Thanks for your reply!

Sorry! Circle, I mean at each level I have drawn circles of different diameter and then i have joined using the surface by loft can be seen in fig (Sorry! I didn’t show side view).

Hey,

I had a prod around, and I don’t think it is possible to create a radial dimension for a circle which you are looking at in elevation (to dimension you need to make a model line). I can’t do it in Revit which seems a clincher.

You can generate reference planes and use them to create a dimension in the elevation, but it won’t be dynamic, so i presume that extra work isn’t so much use to you.

Placing text near the circles to label their radius is pretty straight forward…

Hope that helps,

Mark

FYI… Circle elements have a property called centre point reference https://www.revitapidocs.com/2015/8e17164e-f2d0-828d-8fe2-9720fec91303.htm you can also return the circle geometry (with options enabled) to get references, so you can probably make a radial dim in plan views… I guess you would make a line from the centre point to the circle edge to locate the dim.

2 Likes

Hi Mark,

Thanks for your reply!
I am trying to do as you did by text but i couldn’t find textnote.byviewpointandtype. So could how did you get it or do i need to install any other package?
Thanks.

Hey, you’ll need Archi-lab…

For posterity, here’s my attempt at making a radial dim in plan! Not sure why it fails… But it thinks there aren’t enough references.

Seemingly the radial dimension class is only exposed for families…

So I’ve had to go with a typical one…

import clr

# Import RevitAPI
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *
import System

clr.AddReference("ProtoGeometry")
from Autodesk.DesignScript import Geometry as geom

import Autodesk.Revit.Creation.FamilyItemFactory as ADC

# Import Element wrapper extension methods
clr.AddReference("RevitNodes")
import Revit
from Autodesk.Revit.DB import *

# Import ToProtoType, ToRevitType geometry conversion extension methods
clr.ImportExtensions(Revit.GeometryConversion)

clr.AddReference("RevitAPIUI")
from Autodesk.Revit.UI.Selection import ObjectType

clr.AddReference("ProtoGeometry")
from Autodesk.DesignScript import Geometry as geom

#for our selection box
from Autodesk.Revit.UI.Selection import *

# Import DocumentManager and TransactionManager #
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

def tolist(obj1):
	if hasattr(obj1,"__iter__"): return obj1
	else: return [obj1]

doc = DocumentManager.Instance.CurrentDBDocument
uidoc = DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument

opts = Options()
#without compute references, none of this works
opts.ComputeReferences = True
#opts.DetailLevel = ViewDetailLevel.Fine
opts.IncludeNonVisibleObjects = True
opts.View = doc.ActiveView

refAr = ReferenceArray()

circleList = tolist(UnwrapElement(IN[0]))

dimList = []
for circle in circleList:
   # cGeo = circle.get_Geometry(opts).Reference fails
    circleGeo = circle.GeometryCurve
    circleGeoB = circleGeo.MakeBound(0, 0.5) #now we can get end points
    circleEntPnt = circleGeo.GetEndPoint(0)
    #circleRef = circleGeo.Reference #i don't think this works properly, it's a line
    #circleGGeo = circle.get_Geometry(opts)
    #circlePtRef = circleGGeo.GetEndPointReference(0)
    #circlePtRef = circleGeoB.GetEndPointReference(0) #fails
    circlePtRef = circleGeo.GetEndPointReference(0)
    cCntrPnt = circle.CenterPointReference
    #refAr.Append(circleRef)
    refAr.Append(circlePtRef)
    refAr.Append(cCntrPnt)
    
    line = Line.CreateBound(circleEntPnt, circleGeo.Center)

    TransactionManager.Instance.EnsureInTransaction(doc)   
    
    #dim = doc.FamilyCreate.NewRadialDimension(doc.ActiveView, circleRef, circle.Location, dimType) in families you can create radial dims but not in projects!   
    
    dim = doc.Create.NewDimension(doc.ActiveView, line, refAr)
    dimList.append(dim)
    
    TransactionManager.Instance.TransactionTaskDone()

OUT = refAr, line.ToProtoType(), circleGeo.Center.ToPoint(), circleEntPnt.ToPoint(), dimList,

Radial Dim in Plan.DYN (19.1 KB)

1 Like

Radial dims are (and I believe this is still the case ) not exposed via the API for revit documents, only revit family documents as Mark says.

I saw this, but there is not solution.