ACE Plugin Development & Customization 2 — Questions and Answers
Question 1: Which Autodesk API namespace is the primary entry point for accessing AutoCAD drawing database objects in a .NET plugin?
- Autodesk.AutoCAD.ApplicationServices
- Autodesk.AutoCAD.DatabaseServices (Correct answer)
- Autodesk.AutoCAD.EditorInput
- Autodesk.AutoCAD.Geometry
Correct answer: Autodesk.AutoCAD.DatabaseServices
Autodesk.AutoCAD.DatabaseServices contains the core classes like Database, BlockTable, and Entity used to read and write drawing data.
Question 2: When developing a Revit plugin, what class must every external command implement?
- IExternalApplication
- IExternalCommand (Correct answer)
- IExternalDBApplication
- RevitCommand
Correct answer: IExternalCommand
IExternalCommand is the interface that defines the Execute method required for all Revit external commands.
Question 3: In AutoCAD .NET API development, what is the correct way to start a transaction for modifying database objects?
- db.StartTransaction()
- db.TransactionManager.StartTransaction() (Correct answer)
- new Transaction(db)
- TransactionManager.Begin()
Correct answer: db.TransactionManager.StartTransaction()
The TransactionManager property on the Database object provides the StartTransaction() method to begin a new transaction.
Question 4: What is the purpose of the PackageContents.xml file in an Autodesk Application Package (.appx)?
- It stores compiled plugin bytecode
- It defines the package metadata and component registration for the App Store (Correct answer)
- It contains the plugin's UI ribbon definitions
- It lists third-party library dependencies
Correct answer: It defines the package metadata and component registration for the App Store
PackageContents.xml describes the package structure, supported products, versions, and which components to load, enabling Autodesk's plug-in loader to register the application.
Question 5: In Forge (now Autodesk Platform Services) Design Automation, what is a 'workitem'?
- A cloud storage bucket for design files
- A single execution request that runs an Activity against input files (Correct answer)
- A reusable script template for batch processing
- An API authentication token for cloud services
Correct answer: A single execution request that runs an Activity against input files
A workitem is an execution instance that references an Activity and provides specific input/output parameters for a single automated run.
Question 6: Which Revit API method is used to filter elements in the active document by a specific built-in category?
- Document.GetElements(BuiltInCategory)
- new FilteredElementCollector(doc).OfCategory(BuiltInCategory) (Correct answer)
- RevitDB.QueryElements(category)
- ElementFilter.ByCategory(doc, BuiltInCategory)
Correct answer: new FilteredElementCollector(doc).OfCategory(BuiltInCategory)
FilteredElementCollector combined with .OfCategory() applies a quick filter that efficiently retrieves elements of the specified built-in category.
Question 7: What does the IFailuresPreprocessor interface allow a Revit plugin to do?
- Prevent the Revit application from launching warnings
- Intercept and handle failure messages before they are shown to the user (Correct answer)
- Disable Revit's built-in validation system
- Log errors to an external monitoring service
Correct answer: Intercept and handle failure messages before they are shown to the user
IFailuresPreprocessor lets plugins programmatically inspect, suppress, or resolve failure messages during a transaction commit before the user sees dialog boxes.
Which Autodesk API namespace is the primary entry point for accessing AutoCAD drawing database objects in a .NET plugin?