Hoyer

Set the order of objects in script

Recommended Posts

Can I set the order of objects on the page in script? I would like to bring some objects to the front when my sequence reaches a given point.

Is there a command for this?

Thank you in advance!

Best Regards,

Hoyer

Share this post


Link to post
Share on other sites

There is not, but you can control the visibility with the "visible" variable which exists on every component.

You could also control ordering by putting the components on a different page and overlaying the pages.  Then when you set the current page with:

page.strCurrentPage = "myPage,my2ndPage"

you can control the ordering as it paints one page, then the next, so this:

page.strCurrentPage = "my2ndPage,myPage"

would paint things differently then the first one.

 

Share this post


Link to post
Share on other sites

Thank you for the answer.

These solutions are not OK for me, I'm doing currently the page changing trick and I would like to reduce the number of pages.
Visibility is not helping me either as this object has functions and I can't set which is activated with Visibility.

It doesn't matter which one is Visible and which one is not, the one which is activated is always which is on top of all the others.

I could find out two other possible solutions:
1.) Setting the position (like in an X-Y coordinate system) of objects from script. (This way all objects would be somewhere out of the useful range of the page and the necessary one would be moved to the place where the operator will be able to click on it.)
2.) There is a "Change component's page" option when I click on an object while pushing the Ctrl button. Can this command be done from script? Then all the objects which I don't want the operator to click on would be on a "Page_Bin" and the one which shall be used moves to the other page when the script reaches the given point.

Thank you in advance!

Share this post


Link to post
Share on other sites

Nevermind, I've found the solution.

I move the objects on the same page as I described in method 1.)

Thank you for the quick help!
Best Regards,
Hoyer

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now