.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Iterate through all layout form left to right

4 REPLIES 4
Reply
Message 1 of 5
ninh.ht
344 Views, 4 Replies

Iterate through all layout form left to right

Hello everyone, now I want to rename all layouts begin 1 from left to right by using C#. Anyone can help me please! Thank you!

Tags (1)
Labels (1)
4 REPLIES 4
Message 2 of 5
_gile
in reply to: ninh.ht

Hi,

Order the layouts by their TabOrder property.



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

Message 3 of 5
ninh.ht
in reply to: ninh.ht

hello @_gile , i want to iterate all Layout tab name and add them to a Listbox then I will renumber them but normally, the listbox layout name isn't from left to right order. Look at the photo, I add 2 layouts (Layout1, Layout2) and listbox show form left to right, but when I move Layout 1 to the top, the listbox don't show form left to right

ninhht_0-1636965214718.png

ninhht_1-1636965243984.png

Thanks!

 

Message 4 of 5
_gile
in reply to: ninh.ht

I am not able to answer without knowing anything about your ListBox.



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

Message 5 of 5
BlackBox_
in reply to: ninh.ht

Duplicate thread: 

 

https://forums.augi.com/showthread.php?176212-Iterate-through-all-layout-and-rename-them-from-left-t...

 

 

Perhaps OrderBy() will help: 

 

layoutList.OrderBy(x => x.TabOrder).ToList();

 

 



"How we think determines what we do, and what we do determines what we get."

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost