Instant Autodesk Revit 2013 Customization With ... Guide
Every external command needs a specific structure. Use this template:
: Learn to use get_Parameter() and Set() to read/write data.
C:\PathToYourDll\MyPlugin.dll MyPlugin.MyCommand Insert-New-Guid-Here ADSK Run My Custom Tool Use code with caution. Copied to clipboard 🚀 Key Learning Milestones Instant Autodesk Revit 2013 Customization with ...
: Use uiApp.ActiveUIDocument.Selection to interact with what the user clicks.
💡 : Use RevitLookup . It is an open-source tool that lets you "peek" under the hood of Revit elements to see their API properties in real-time. Every external command needs a specific structure
[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)
To help you move faster, would you like a code snippet for a (like auto-renaming levels) or a guide on debugging your code? Copied to clipboard 🚀 Key Learning Milestones :
: Add using Autodesk.Revit.DB; and using Autodesk.Revit.UI; at the top. 💻 The Boilerplate Code