Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Dear Friends,
I want to manage link file worksets open/close, thus I use WorksetConfiguration and RevitLinkType.LoadFrom() to Reload link files in current rvt, but it always makes Revit crash 😞
I try some methods according to previous Forum records, but all failed...
Here is my codes:
foreach (var key in result.Keys) { var linkdoc = key; var openids = result[key].OpenedList.Select(x => x.Id).ToList(); var closeids = result[key].ClosedList.Select(x => x.Id).ToList(); var config = new WorksetConfiguration(); if (openids != null && openids.Any()) { config.Open(openids); } if (closeids != null && closeids.Any()) { config.Close(closeids); } var mp = ModelPathUtils.ConvertUserVisiblePathToModelPath(linkdoc.PathName); var rlt = rvtlinktypes.FirstOrDefault(x => x.Name.Equals(linkdoc.Title)) as RevitLinkType; rlt.LoadFrom(mp, config); }
I hope that you can help me, many thanks!
Best Regards,
Frank Liang
TJAD BIM Software Dev Lead
Solved! Go to Solution.