Created
June 13, 2020 12:41
-
-
Save chuongmep/11baf2775d037abf246bd3cd86748ae9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import clr | |
clr.AddReference('RevitAPI') | |
from Autodesk.Revit.DB import * | |
import Autodesk | |
clr.AddReference("RevitServices") | |
import RevitServices | |
from RevitServices.Persistence import DocumentManager | |
from RevitServices.Transactions import TransactionManager | |
doc = DocumentManager.Instance.CurrentDBDocument | |
uiapp = DocumentManager.Instance.CurrentUIApplication | |
app = uiapp.Application | |
a = UnwrapElement(IN[0]) | |
v = UnwrapElement(IN[1]) | |
TransactionManager.Instance.EnsureInTransaction(doc) | |
for i in a: | |
i.SetDatumExtentType(DatumEnds.End0,v, DatumExtentType.ViewSpecific) | |
i.SetDatumExtentType(DatumEnds.End1,v, DatumExtentType.ViewSpecific) | |
TransactionManager.Instance.TransactionTaskDone() | |
OUT = v |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment