Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

 

 

Sub Main ()
On Error Resume Next
Dim drawingDoc As DrawingDocument = ThisDoc.Document
Dim Sheet As Sheet = Nothing
Dim sheetsList As New List(Of Sheet)
Dim BrowserPane As BrowserPane = drawingDoc.BrowserPanes.Item("Model")

For Each Sheet In drawingDoc.Sheets
	sheetsList.Add(Sheet)
Next

sheetsList.Sort(AddressOf Comparer)

For Each Sheet In sheetsList
	Dim sheetNode As BrowserNode = BrowserPane.GetBrowserNodeFromObject(Sheet)
	Dim bottomNode As BrowserNode = BrowserPane.TopNode.BrowserNodes.Item(BrowserPane.TopNode.BrowserNodes.Count)
	BrowserPane.Reorder(bottomNode, False, sheetNode)
Next
End Sub

Private Function Comparer(x As Sheet, y As Sheet) As Integer
	Return String.Compare(x.Name,y.Name)
End Function

 

Excuse me, I am missing the function below everything, greetings!


Please accept as solution and give likes if applicable.

I am attaching my Upwork profile for specific queries.

Sergio Daniel Suarez
Mechanical Designer

| Upwork Profile | LinkedIn