码迷,mamicode.com
首页 > 其他好文 > 详细

creat floor

时间:2017-12-11 14:12:47      阅读:253      评论:0      收藏:0      [点我收藏+]

标签:sign   prot   pre   persist   evel   nta   color   blog   actions   

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

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

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

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

doc = DocumentManager.Instance.CurrentDBDocument

ArrayCurves = IN[0]
floorType = UnwrapElement(IN[1])
levels = UnwrapElement(IN[2])
structural = IN[3]

curveArray = CurveArray()

for c in ArrayCurves:
    curveArray.Append(c.ToRevitType())

TransactionManager.Instance.EnsureInTransaction(doc)
newFloor = doc.Create.NewFloor(curveArray, floorType, levels, structural)
out = newFloor.ToDSType(False)
TransactionManager.Instance.TransactionTaskDone()

OUT = out

 

creat floor

标签:sign   prot   pre   persist   evel   nta   color   blog   actions   

原文地址:http://www.cnblogs.com/ShirleyX/p/8022304.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!