Jump to content
  • 0

Layer Options add "Active and Below" please?


Matt Overton

Question

With Modelling* being the way we do things this days it would be great to have and "Active and Below" Layer Option.

 

Doesn't need to be fancy render view or filter things that are well above zone of the host layer. Just work purely on the Z value of layer. If I have my model set up correctly it should work nicely if I don't it'll make it easier for to see.

 

*modelling being an interesting division in VW userland.

Link to comment

3 answers to this question

Recommended Posts

  • 0

I am not happy with this but here is a version that basically works.  After setting the Layer Visibility, the Navigation Palette does not update to show that the layers have been set to Invisible. I have added a call to open the Organization Palette. Hit Enter to access the OK button and when it closes the Navigation Palette updates.

 

Hopefully one of guru scripters can find a better work around.

 

This script only looks at the Layer Elevation. It it is greater that the elevation of the active layer its visibility is set to Invisible. If it is less than or equal to the active layer it is left alone.

 

Procedure HideLayersAbove;

{January 22, 2020}
{©2020 Patrick Stanford pat@coviana.com}
{Licensed under the GNU Lesser General Public License}

Var	H1, H2: Handle;
	R1, R2, R3: Real;

Begin
	H1:=ActLayer;
	GetLayerElevation(H1,R1,R3);
	H2:=FLayer;
	While ((H2<>Nil) and (GetObjectVariableInt(H2,154)=1)) do
		Begin
			GetLayerElevation(H2,R2,R3);
			If R2>R1 then SetObjectVariableInt(H2,153,-1);
			ResetObject(H2);
			H2:= NextLayer(H2);
		End;
	DisplayOrganizationDialog(2);
End;

Run(HideLayersAbove);
	

 

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
Answer this question...

×   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...