Un Ejemplo de lenguaje C# para crear una Macro , nivel de aplicación sería el siguiente:
private void Module_Startup(object sender, EventArgs e)
{
this.Application.DocumentOpened += new EventHandler<Auto
desk.Revit.DB.Events.DocumentOpenedEventArgs>(Application_Do
cumentOpened);
}
void Application_DocumentOpened(object sender, Autodesk.Re
vit.DB.Events.DocumentOpenedEventArgs e)
{
System.Windows.Forms.MessageBox.Show(«message here»);
}
private void Module_Shutdown(object sender, EventArgs e)
{
this.Application.DocumentOpened -= new EventHandler<Autodesk.Re
vit.DB.Events.DocumentOpenedEventArgs>(Application_DocumentOpe
ned);
}
}
(información obtenida del Manual de Autodesk Revit Architecture)
Contenido Web de Yolanda Muriel está sujeto bajo Licencia Creative Commons Atribución-NoComercial-SinDerivadas 3.0 Unported.