ApplicationElementTypeDuplicating Event |
Subscribe to the ElementTypeDuplicating event to be notified when Revit is just about to duplicate an element type.
Namespace: Autodesk.Revit.ApplicationServicesAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic event EventHandler<ElementTypeDuplicatingEventArgs> ElementTypeDuplicating
Public Event ElementTypeDuplicating As EventHandler(Of ElementTypeDuplicatingEventArgs)
public:
event EventHandler<ElementTypeDuplicatingEventArgs^>^ ElementTypeDuplicating {
void add (EventHandler<ElementTypeDuplicatingEventArgs^>^ value);
void remove (EventHandler<ElementTypeDuplicatingEventArgs^>^ value);
}
member ElementTypeDuplicating : IEvent<EventHandler<ElementTypeDuplicatingEventArgs>,
ElementTypeDuplicatingEventArgs>
Value
EventHandlerElementTypeDuplicatingEventArgs
RemarksThis event is raised when Revit is just about to duplicate an element type.
Event is cancellable. To cancel it, call the 'Cancel()' method in event's argument to True.
Your application is responsible for providing feedback to the user about the reason for the cancellation.
The following API functions are not available for the current document during this event:
- All overloads of Autodesk.Revit.DB.Document.Import()
- [!:Autodesk::Revit::DB::Document::Close()] and similar overloads.
- [!:Autodesk::Revit::DB::Document::Save()] .
- [!:Autodesk::Revit::DB::Document::SaveAs(String)] and similar overloads.
Exception InvalidOperationException will be thrown if any of the above methods is called during this event.
Another ElementTypeDuplicated event will be raised immediately after duplicating an element type is finished.
See Also