Jump to content
Developer Wiki and Function Reference Links Read more... ×
josue Corona

Viewports and Planes Views

Recommended Posts

is there a way in vector works that you can create a view port and instead of choosing custom or the given views , to look at a view that you have saved from your design layer or to look at a  plane that you have created ?

Share this post

Link to post

maybe the save view option may be closer to what you want?


Screenshot 2019-07-19 at 19.47.27.jpg

Share this post

Link to post
Posted (edited)

@josue Corona ,

   I assume you mean to do this with VectorScript, considering where you posted your question?


   Here's a short script showing how to copy a view. The attached file shows the same thing, using the 1st design layer to set the view and a selected viewport to receive the view setting.  You can use a similar approach to get the view rotations of a working plane by using the GetWorkingPlane() command.

{ Example script to copy a Design Layer view and apply it to a Viewport. }
{ Select a Viewport. Run script. }
{ The script copies the view from the First Design Layer to the selected VP. }
{ 19 Jul 2019 - Raymond J Mullin }
	Hdl, Hvp :Handle;

	procedure ApplyViewFromDLtoVP(Hdl, Hvp :Handle);
	{ Copy the view from design layer (Hdl) to viewport (Hvp). }
		B :Boolean;
		Vr, Vc :Vector;
		if (GetTypeN(Hvp) = 122) & (GetTypeN(Hdl) = 31) then
			if GetViewMatrix(Hdl, Vc.x, Vc.y, Vc.z,   Vr.x, Vr.y, Vr.z) then
				B := SetViewMatrix(Hvp, Vc.x, Vc.y, Vc.z,   Vr.x, Vr.y, Vr.z);
	End;	{ ApplyViewFromDLtoVP}

	Hvp := FSActLayer;		{ handle to selected VP }
	Hdl := FLayer;			{ handle to an arbitrary design layer }
	ApplyViewFromDLtoVP(Hdl, Hvp);		


   Not knowing what version of VW you are running I exported the file as v2016, (and for others using older versions.) Please add a signature to your profile. It really will help people answer your questions more accurately.




Copy View from DL to VP v2016.vwx


Edited by MullinRJ

Share this post

Link to post

You can use the clip cube to create viewports and can link a viewport to a Renderworks camera, but you will have to use a script if you want to align an existing viewport view to a saved view or saved working plane.

Share this post

Link to post

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


7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114


© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.