Jump to content
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

@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

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.

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.


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.

  • Create New...