Jump to content

Reverse stacking order


Recommended Posts

So how can I reverse the stacking order of a large number of objects. My current project has 74 pages imported from PDF. A wish list item for importing a PDF that way, and waiting x years, is not the best answer.

 

Anybody got a neat trick?

Link to comment

Try this script.

 

Procedure Reverse_Stack_Order;

{© 2017 Pat Stanford pat@coviana.com}
{Licenced under the LGPL}
{Reverses the stacking order of selected objects}
{Brings all selected objects to the top of the stacking order}

{No Warranty Expressed or Implied. Test for suitability}
{before use on live data. Make backup copies.}
{Avoid caffine and alcohol when using.}
{Excessive amounts of carrots may be bad for your health.}

Var	H1,H2,H3 :Handle;
	N1,N2:		Integer;
	
Begin;

	H1:=FSActLayer;
	H2:=LSActLayer;
	H3:=H1;


	If Count(((VSEL))) >1 then
	Begin
	Repeat
		Begin
			H3:=PrevSObj(H2);
			HMoveForward(H2,True);
			H2:=H3;
		End;
	Until H2=H1;
	HMoveForward(H1,True);
	End;
End;

Run(Reverse_Stack_Order);

 

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...