DWFx not export correctly revit links mirror in the same project

DWFx not export correctly revit links mirror in the same project

emaguilera
Contributor Contributor
287 Views
2 Replies
Message 1 of 3

DWFx not export correctly revit links mirror in the same project

emaguilera
Contributor
Contributor

I need to export a 3D view in which I have revit links mirrored in the 3D view, the problem is that when doing the dwfx export, not all the revit links that are mirrored are displayed, only one is displayed. I tried to do it with revit but it doesn't work, I have this code in c#, and it doesn't work as it should either.

 

 

 public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
 {
     // Obtener la aplicación y el documento activo
     UIApplication uiApp = commandData.Application;
     UIDocument uiDoc = uiApp.ActiveUIDocument;
     Document doc = uiDoc.Document;

     // Definir la vista activa
     View view = uiDoc.ActiveView;

     // Definir la ruta del archivo DWFX
     string filePath = "E:\\DWFx";

     // Crear una nueva instancia de ViewSet
     ViewSet views = new ViewSet();
     // Agregar la vista activa al conjunto de vistas
     views.Insert(view);

     // Crear opciones para la exportación a DWFX
     DWFXExportOptions dwfxOptions = new DWFXExportOptions();
     // Configurar las opciones según sea necesario
     dwfxOptions.MergedViews = true;
     dwfxOptions.ExportingAreas = true;

     try
     {
         // Iniciar una transacción
         using (Transaction transaction = new Transaction(doc, "Exportar a DWFX"))
         {
             transaction.Start();

             // Exportar la vista a DWFX dentro de la transacción
             doc.Export(filePath, "Vista-Test", views, dwfxOptions);

             // Confirmar la transacción
             transaction.Commit();
         }

         // La exportación fue exitosa
         TaskDialog.Show("Exportación exitosa", "La vista se ha exportado a DWFX correctamente.");
         return Result.Succeeded;
     }
     catch (Exception ex)
     {
         // La exportación falló
         message = ex.Message;
         return Result.Failed;
     }
 }

 

 

0 Likes
288 Views
2 Replies
Replies (2)
Message 2 of 3

jeremy_tammik
Alumni
Alumni

Oh dear. Do you observe the same behaviour working manually in the user interface? If so, the most efficient way to report this is as a product issue, not an API one.

   

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 3 of 3

emaguilera
Contributor
Contributor

Thanks for your reply. I tried using the Revit 2023 interface and I couldn't see the mirrored links in DWFx.
I tried another version of Revit and it was solved with version 2025.

0 Likes