Message 1 of 3
Get Parameter values for which Sheet can not deleted
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I know only way to extract Parameter information as below. The code is working fine where Sheet is having no revisions, but if it is having revisions it is not working. If we try to delete sheet manually, it shows message "The Revision of this Revision Cloud has been issued. Deletion of this Revision Cloud is prohibited." My code stuck at ids = doc.Delete(vw.Id);,
Is there any alternative way to extract parameters for the sheets which can not be deleted because of Revision present in the sheet?
OR Any process to delete Revisions temporary from the sheet?
I know how to retrieve Revision by using
IList<ElementId> myIlist = new List<ElementId>();
myIlist = ViewSheet.GetAllProjectRevisionIds();
But do not know how can I delete Revisions from the sheet temporary.
Thanks in advance for your kind help in this regards,
Regards,
Rajesh
Document doc = commandData.Application.ActiveUIDocument.Document; ICollection<ElementId> ids = null; using (Transaction trans = new Transaction(doc, "TempTransaction")) { trans.Start(); // Ensure that ViewSheet is not the active view // before performing the delete task ids = doc.Delete(vw.Id); trans.RollBack(); } foreach (ElementId id in ids) { Element elementType = doc.GetElement(id); if (elementType.GetType().ToString() == "Autodesk.Revit.DB.ViewSheet") { // Check for Defination name in the Sheet var mydefinationList = new List<string>(); foreach (Parameter p in elementType.Parameters) { if (null != p) { mydefinationList.Add(p.Definition.Name.ToUpper()); } } } }