Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var tran = new Transaction(DB.Doc);
tran.Start("s");
var extrusionRef = DB.UIApp.ActiveUIDocument.Selection.PickObject(
ObjectType.Element, "Select a circular extrusion: ");
var extr = DB.Doc.GetElement(extrusionRef.ElementId) as Extrusion;
var skt = extr.Sketch;
Arc arc = null;
foreach (CurveArray curArr in skt.Profile)
foreach (Curve curve in curArr)
{
arc = curve as Arc;
break;
}
var dimension = DB.Doc.FamilyCreate.NewRadialDimension(DB.Doc.ActiveView, arc.Reference, arc.Center);
tran.Commit();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment