Instant Autodesk Revit — 2013 Customization With ...

[Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] public class MyCommand : IExternalCommand { public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) { // 1. Get the Document UIApplication uiApp = commandData.Application; Document doc = uiApp.ActiveUIDocument.Document; // 2. Start a Transaction using (Transaction trans = new Transaction(doc, "My Customization")) { trans.Start(); // Your logic goes here (e.g., changing a parameter) trans.Commit(); } return Result.Succeeded; } } Use code with caution. Copied to clipboard 📝 Manifest Files (.addin)

: Use uiApp.ActiveUIDocument.Selection to interact with what the user clicks. Instant Autodesk Revit 2013 Customization with ...

: The primary way to "find" things in your model (like all Walls or Doors). [Autodesk

Every external command needs a specific structure. Use this template: ref string message

Subscribe to our newsletter

Follow us!

@kunstencentrumbuda