Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello, I need to get all the Workset in the model. I usually use something like this -
List<WorksetPreview> Worksets = WorksharingUtils.GetUserWorksetInfo( ).ToList();
But if the central model is not (removed), then it does not work and you have to use this code -
var wsrevs=new List<WorksetPreview>(); var tb = doc.GetWorksetTable(); try { for (int i = 0; i < 999999; i++) { Workset wset = tb.GetWorkset(new WorksetId(i)); wsrevs.Add(wset); } } catch { }
It seems to me not very right, maybe there is another way?
Solved! Go to Solution.