Command isn't waiting until tabs are finished being created/deleted to sort layouts

Command isn't waiting until tabs are finished being created/deleted to sort layouts

tristan.jonas8XAAW
Advocate Advocate
315 Views
1 Reply
Message 1 of 2

Command isn't waiting until tabs are finished being created/deleted to sort layouts

tristan.jonas8XAAW
Advocate
Advocate

Hello,

 

I'm using this script right now to integrate the layer sorting command into some other scripts I made that delete/create new tabs:

 

https://drive-cad-with-code.blogspot.com/2011/06/set-layout-in-order.html

 

The problem is that when I put this at the very end of my script:

 

SetLayoutOrder("ASC")
ed.Regen()

Msgbox("Done")

End Sub

 

i'll receive the signal that it's "Done" but I can clearly see in the layouts corner that nothing has been created or deleted yet, so when I finally hit "Ok" it finally creates and deletes all the files and nothing gets sorted. I created a separate command that is just the exact same thing as above and it works just fine so I know the command itself works but it doesn't seem to be executing my code in order. Thoughts?

0 Likes
316 Views
1 Reply
Reply (1)
Message 2 of 2

kerry_w_brown
Mentor
Mentor

At the time @norman.yuan gets to look at this I'm sure he'll need to see your translation (to VB.net) code.

 

This doesn't seem related to Normans example:

>> finally hit "Ok" it finally creates and deletes all the files  <<

You may need to clarify this :

>> separate command that is just the exact same thing as above and it works just fine <<

 

Regards,


// Called Kerry or kdub in my other life.

Everything will work just as you expect it to, unless your expectations are incorrect. ~ kdub
Sometimes the question is more important than the answer. ~ kdub

NZST UTC+12 : class keyThumper<T> : Lazy<T>;      another  Swamper
0 Likes