Skip to content
Bring objects to fr...
 
Notifications
Clear all

Bring objects to front/send to back

3 Posts
2 Users
1 Reactions
1,840 Views
Hadi Eshraghi
Posts: 6
Customer
Topic starter
(@ftnsbonl38owc63xjps05ixlkbt2)
Active Member
Joined: 3 years ago

Hello,

How do I bring objects to front or send them to back programmatically?

 

Thanks

Topic Tags
2 Replies
Lonnie Chrisman
Posts: 42
Admin
(@lchrisman)
Member
Joined: 14 years ago

The Front-to-back is determined by the z-order, which is stored in the NodeLocation attribute.  It is an integer, and can be positive or negative.  Nodes with larger Z-order display over nodes with lower Z-order.  When you select "Bring to Front" on the right-mouse context menu, it sets the Z-order to a number that is larger than the other z-orders on the same diagram.

Here is a UDF to do it:

Function Send_to_front(o : Object)

Definition:

Local z := NodeLocation::z of Contains of isin of o;
NodeLocation::z of o := Max([10,z+1])

Function Send_to_back(o : Object)

Local z := NodeLocation::z of Contains of isin of o;
NodeLocation::z of o := Min([-10,z-1])

 

Reply
1 Reply
Hadi Eshraghi
Customer
(@ftnsbonl38owc63xjps05ixlkbt2)
Joined: 3 years ago

Active Member
Posts: 6

Great, thanks!

Reply
Share:

Download the free edition of Analytica

The free version of Analytica lets you create and edit models with up to 101 variables, which is pretty substantial since each variable can be a multidimensional array. It also lets you run larger modes in ‘browse mode.’ Learn more about the free edition.

While Analytica doesn’t run on macOS, it does work with Parallels or VMWare through Windows.


    Analytica Cubes Pattern

    Download the free edition of Analytica

    The free version of Analytica lets you create and edit models with up to 101 variables, which is pretty substantial since each variable can be a multidimensional array. It also lets you run larger modes in ‘browse mode.’ Learn more about the free edition.

    While Analytica doesn’t run on macOS, it does work with Parallels or VMWare through Windows.


      Analytica Cubes Pattern