Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
While searching through the API, I found this snippet:
public Workset CreateWorkset(Document document)
{
Workset newWorkset = null;
// Worksets can only be created in a document with worksharing enabled
if (document.IsWorkshared)
{
string worksetName = "New Workset";
// Workset name must not be in use by another workset
if (WorksetTable.IsWorksetNameUnique(document, worksetName))
{
using (Transaction worksetTransaction = new Transaction(document, "Set preview view id"))
{
worksetTransaction.Start();
newWorkset = Workset.Create(document, worksetName);
worksetTransaction.Commit();
}
}
}
return newWorkset;
}
But when using the Revit SharpDevelop I can't run the macro in the macro manager, it just doesn't show up as a macro but there are also no errors during build. Am I doing something wrong?
Solved! Go to Solution.