question

Sebastian Lang avatar image
1 Like"
Sebastian Lang asked Sebastian Lang commented

Is there a command for "Sort Alphabetically"?

Hi,

I wonder, if it is possible to sort the (first level) subnodes of a model in alphabetical order by calling the corresponding function in a script.

More precisely, I am searching for the function which is shown on the screenshot.

Nice regards!

Choose One
commandsscriptingsortalphabetically
unbenannt.png (11.5 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
Phil BoBo avatar image
1 Like"
Phil BoBo answered Sebastian Lang commented

This will sort the subnodes under the model alphabetically:

applicationcommand("alphabetize",model(),1,content(model()));
setrank(node("/Tools",model()), 1);
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Sebastian Lang avatar image Sebastian Lang commented ·

Thank you!

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.