Revit Architecture Forum
Welcome to Autodesk’s Revit Architecture Forums. Share your knowledge, ask questions, and explore popular Revit Architecture topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Open external file (Hyperlink)

0 REPLIES 0
Reply
Message 1 of 1
IgBorges
336 Views, 0 Replies

Open external file (Hyperlink)

Hi.

I need open a file Excel through Revit. Similar hyperlink.

I created this code, but does not open:

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);
        }
}

How do I do?

Thanks

Tags (1)
0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report