Hello Dynos,
I have some weard stuff:
My script put out meter (it should) when write 2.5 i makes the wall 25cm height, and even that is wrong it puts the value to 2.3226… a.s.o. why?
I´ve seen i can create a base-level, but how about a top-level? (instead of height) does anybody know a syntex? TopLevelId
?
import sys
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Structure import *
clr.AddReference('RevitAPIUI')
from Autodesk.Revit.UI import *
clr.AddReference('System')
from System.Collections.Generic import List
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.ImportExtensions(Revit.Elements)
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
lines = IN[0]
level = UnwrapElement(IN[1])
type = UnwrapElement(IN[2])
height = UnitUtils.ConvertFromInternalUnits(IN[3],DisplayUnitType.DUT_METERS)
output = []
TransactionManager.Instance.EnsureInTransaction(doc)
for i in lines:
wall = Wall.Create(doc,i.ToRevitType(),type.Id,level.Id,height,0,0,1)
output.append(wall)
TransactionManager.Instance.TransactionTaskDone()
OUT = output
SetupWall.dyn (33.7 KB)
Some advice would be nice
KR
Andreas