当前位置:网站首页>Revit secondary development - get the project file path

Revit secondary development - get the project file path

2022-07-07 22:23:00 Hey, hey, hey, hey, hey

Cannot pass when detaching and opening items doc.PathName Get the project path ,

Only in DocumentOpening Obtained from the event .

Public class Menu : IExternalApplication
{
    public Result OnStartup(UIControlledApplication application)
    {
        application.ControlledApplication.DocumentOpening += ControlledApplication_DocumentOpening;
        return Result.Succeeded;
    }
    void ControlledApplication_DocumentOpening(object sender, Autodesk.Revit.DB.Events.DocumentOpeningEventArgs e)
    {
        if(!e.IsCancelled())
        {
            string pathName = e.PathName;
        }
    }
}

原网站

版权声明
本文为[Hey, hey, hey, hey, hey]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202130606206699.html