Application: DisallowEndWrapping
Revit Platform: All
Revit Version: 2025.0
First Released For: 2025.0
Programming Language: C#
Skill Level: Beginning
Category: Elements
Type: ExternalCommand

Subject: DisallowEndWrapping
Summary: 
This sample demonstrates how to use public APIs to allow or disallow end wrapping at some locations of a wall.

Classes: 
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.DB.Wall
Autodesk.Revit.DB.Reference
Autodesk.Revit.DB.Document

Project Files: 
Command.cs
This file contains the class Command which inherits from IExternalCommand interface and implements the Execute method.

WallInformationForm.cs
This file contains a Form class, its constructor need an input parameter, in this case it’s the selected wall, in updateDisplay(Wall wall), it lists all valid location's data on the view. And for 2 buttons on the form, clicking them can start transaction to allow/disallow end wrapping 

Description: 
This sample provides following functionalities.
-	Let user get all valid end wrapping locations.
-	Let user get the value if one location's end wrapping is allowed.
-	Let user get one location's raw parameter on wall's curve.
-	Let user get one location's related faces.
-	Let user allow or disallow one location's end wrapping.

Instructions: 
Open Revit application and select a wall, then execute the command.
1.	All location end wrapping data is listed on the form.
2.	Input a valid location number, click allow/disallow button.
Expected result: that location’s end wrapping will be allowed/disallowed.