Message 1 of 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I'm fiddling with API to create a button which opens a certain file.
I've got the whole ribbon, button working however. opening a file though ....
What am I missing / does open command need a return Result.succesful ?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using Autodesk.Revit.Attributes;
using Autodesk.Revit.UI.Selection;
namespace OpenLib
{
public Document OpenDocumentFile(
string openlib = "T:\Revit 2016\My Lib.rvt";
)
}
I tried without result
private static Document OpenDocumentFile(ModelPath modelPath)
{
ModelPath modelPath = "T:\Revit 2016\My Lib.rvt";
Document openedDoc = application.OpenDocumentFile(modelPath);
return openedDoc;
}
love python coding
Solved! Go to Solution.