Created
June 13, 2020 12:41
-
-
Save chuongmep/217063d7c2ec2fe6a0c01880ee5e05af 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
public static string Convert3DTo2D(Revit.Elements.Views.View view, List<Element> GridorLevel) | |
{ | |
Document doc = DocumentManager.Instance.CurrentDBDocument; | |
View v = view.InternalElement as View; | |
TransactionManager.Instance.EnsureInTransaction(doc); | |
List<DatumPlane> planes = GridorLevel.Select(x => x.InternalElement).Cast<DatumPlane>().ToList(); | |
foreach (DatumPlane datumPlane in planes) | |
{ | |
datumPlane.SetDatumExtentType(DatumEnds.End0, v, DatumExtentType.ViewSpecific); | |
datumPlane.SetDatumExtentType(DatumEnds.End1, v, DatumExtentType.ViewSpecific); | |
} | |
TransactionManager.Instance.TransactionTaskDone(); | |
TransactionManager.Instance.ForceCloseTransaction(); | |
return "Execute"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment