Dimension Circle Radius

Hi All

I am trying to create a radial dimension on a detail item in a view. I can’t seem to get the API method AngularDimension.Create to work. My Python code returns the error “references should be at least two, non parallel and rays of the arc passed” so I am most likely not inputting the circle references the correct way.
I tried following the tread at the link below.
Thanks for your help.

import clr
import System
clr.AddReference('ProtoGeometry')
import Autodesk.DesignScript.Geometry as DSGeo
from Autodesk.DesignScript.Geometry import *

#import Revit API
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *
import Autodesk.Revit.DB as DB

#import transactionManager and DocumentManager (RevitServices is specific to Dynamo)
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
uidoc = uiapp.ActiveUIDocument
app = uiapp.Application
sdkNumber = int(app.VersionNumber)


clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.GeometryConversion)

#INPUTS
circleCurve = UnwrapElement(IN[0])
dimType = UnwrapElement(IN[1])
point = UnwrapElement(IN[2])


#CODE
ref = Reference (circleCurve)
activeView = doc.ActiveView

arc = circleCurve.GeometryCurve
arcCenter = arc.Center
arcCenterRef = circleCurve.CenterPointReference

refs = [ref,arcCenterRef]


TransactionManager.Instance.EnsureInTransaction(doc)

AngularDimension.Create(doc,activeView,arc,refs,dimType)

			
TransactionManager.Instance.TransactionTaskDone()

OUT =  arcCenterRef,refArray

Hello,
the NewRadialDimension method is not available in a project document (API limitation)

2 Likes

Ahh!
I’ve been going around in circles all morning trying to figure it out.
Thanks for the response.
Surely it won’t be that difficult to expose this.
Thanks again.

@bayowindapo Did you found out any methods for that. I am searching through, could not find any. Thanks

Hi i know it isnt radial dimension, but probably something here could work in some cases

1 Like

Thanks will look into that but was looking for Diameter Dimension. This is also helpful

1 Like

can easy work for diameter, just connect curves endpoints instead of circle center

1 Like

ok thanks

Hello. I never did, unfortunately.

ok @bayowindapo .

@jacob.small can you throw your light on this

Not exposed in the API means it cannot really be done.

The linear dimension shown here is the closest alternative and the root I would go.

3 Likes