How to Get Location Line of Arc Wall in PythonScript?

Hi All,

There is a node “Element.GetLocation” can help to get the Arc Wall Curve.

I am now trying to use python script to get the curve, because I need the arc center point for some calculation.

But I can’t, the Error is:

My Script:

import clr
from Autodesk.Revit.DB import *

import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument

import Revit
from Revit.Elements import *

from Autodesk.DesignScript.Geometry import *

ele = IN[0]
cp = UnwrapElement(ele[0]).Location.Curve.CenterPoint

#Assign your output to the OUT variable.
OUT = cp

It is quiet weird that Arc has no attribute “CenterPoint” (but I can find it from RevitAPI document).

Anyone know why?

Thank you.

1 Like

Oh, I found the reason :sweat_smile:

There is no CenterPoint on Revit 2017 Arc Attribute… it should be Center…:sweat_smile:

Revit API always makes me confuse, why does autodesk change API name in each revit version…