How to convert Autodesk.DesignScript.Geometry.Arc to Autodesk.Revit.DB.Arc

I think it is CurveElement.Curve, this will create Revit Model Line

Hi, here a solution:

# Load the Python Standard and DesignScript Libraries
import sys
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

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

# The inputs to this node will be stored as a list in the IN variables.
DsArc = IN[0]
# Place your code below this line
pts = [DsArc[0].PointAtParameter(p) for p in [0,0.5,1]]
xyzS = []

for p in pts:
	xyzS.append(XYZ(p.X, p.Y, p.Z))

# Assign your output to the OUT variable.
OUT = Arc.Create(xyzS[0], xyzS[1], xyzS[2])

Manage to solve it by using ToRevitType()

1 Like

A post was split to a new topic: ToRevitType() do not convert Arc properly