Message 1 of 2
Open external file (Hyperlink)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi
I need open a file Excel through Revit. Similar to hyperlink.
What click the button, it opens the file. (Sorry, my english, i'm from Brazil :D)
Thanks!
This is the code, but does not work:
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Linq; using System.Net; using System.Windows.Forms; using System.Windows.Threading; using System.Data.OleDb; using System.Diagnostics; using Autodesk.Revit.DB; using Autodesk.Revit.DB.Architecture; using Autodesk.Revit.UI; using Autodesk.Revit.UI.Selection; using Autodesk.Revit.ApplicationServices; using Autodesk.Revit.Attributes; [TransactionAttribute(TransactionMode.Manual)] [RegenerationAttribute(RegenerationOption.Manual)] public class OpenExcelTesoura : IExternalCommand { static void Main() { OpenMicrosoftExcel(@"X:\Biblioteca\06 - REVIT\Componentes Revit\Damiani\Estrutural\Treliças\TESOURAS DAMIANI.xlsm"); } static void OpenMicrosoftExcel(string f) { ProcessStartInfo startInfo = new ProcessStartInfo(); startInfo.FileName = "WINEXCEL.EXE"; startInfo.Arguments = f; Process.Start(startInfo); } }