Thursday, March 7, 2013

Revit 2012 macro renumber sheet view code - for free

this macro is only for revit 2012, I did another version for 2013 using revit python shell.
the video is showing how it works.
 
1. In this application.cs add
public void sheetViewNumberSort()
        {
            if (this.Application.Documents.Size > 0)
            {
                //Get application and document objects
                foreach (Document document in this.Application.Documents)
                {
                    if (document.ActiveView != null)
                    {
                        ClassSheetViewNumberSort pswn = new ClassSheetViewNumberSort(this.Application, this.ActiveUIDocument, this.ActiveUIDocument.Document);
                        pswn.run();
                    }
                }
            }
            else MessageBox.Show("no open document!");
        }
2. the other code can be download at

there are some leftover codes in the file. but won't affect working

Cheers

No comments: