How I can GetSpatialElementBoundary Location no working

Hi!!!
I need GetSpatialElementBoundaryLocation by Element… But Python gives an error message.
what am I doing wrong?

import clr
clr.AddReference(‘RevitAPI’)
import Autodesk
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Structure import *

from System.Collections.Generic import *

import System
clr.AddReference(‘System.Core’)
clr.ImportExtensions(System.Linq)

import math

clr.AddReference(‘ProtoGeometry’)
from Autodesk.DesignScript.Geometry import *

clr.AddReference(“RevitNodes”)
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)

clr.AddReference(“RevitServices”)
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

elements = UnwrapElement(IN[0])

value =

for i in elements:

value.append(i.GetSpatialElementBoundaryLocation(SpatialElementType.Room))

OUT = value

You could get the Room Boundaries by using “Room.FinishBoundary” OOTB node.

I know about this node. But now I am start learn python. And I want understand Python logic.

Alright. You should first get the boundary options currently your missing that part in python. Have a look at revit api doc.
http://www.revitapidocs.com/2018.1/8e0919af-6172-9d16-26d2-268e42f7e936.htm
http://www.revitapidocs.com/2018.1/349e4292-28b6-cffa-e128-50ac5c90db36.htm