Solved! Go to Solution.
Solved by rosalesduquej. Go to Solution.
Hi Marcos,
Yes it is possible now to create a workset from the API, the method got introduced in Revit 2015 UR2 and is now available in Revit 2016.
Here I'm providing you a small snippet of code that you can use in order to create a workset.
If you want to know a bit more about Worksets and the API check this link
http://help.autodesk.com/view/RVT/2016/ENU/?guid=GUID-4BC148EC-6288-495A-A6DD-1524F326B32C
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; }
Hope this helps you, pleae let me know how it goes.
Hi everyone
I created a menu similar a properties panel of revit, where it located the system type parameter native of revit. When selecting a pipe, the system type list available systems.
you can update the value of the system type through api revit?
or a limitation of the api? there an example?
Thanks
thanks for your help.
Is it possible through this method to change workset parameters, for eample "IsEditable" Parameter?
Thanks.
César
Can't find what you're looking for? Ask the community or share your knowledge.