josue Corona Posted July 19, 2019 Share Posted July 19, 2019 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 ? Quote Link to comment
fabrica Posted July 19, 2019 Share Posted July 19, 2019 maybe the save view option may be closer to what you want? Quote Link to comment
MullinRJ Posted July 19, 2019 Share Posted July 19, 2019 (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. PROCEDURE xxx; { 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 } VAR Hdl, Hvp :Handle; procedure ApplyViewFromDLtoVP(Hdl, Hvp :Handle); { Copy the view from design layer (Hdl) to viewport (Hvp). } Var B :Boolean; Vr, Vc :Vector; Begin 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} BEGIN Hvp := FSActLayer; { handle to selected VP } Hdl := FLayer; { handle to an arbitrary design layer } ApplyViewFromDLtoVP(Hdl, Hvp); UpdateVP(Hvp); RedrawAll; END; Run(xxx); 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. Raymond Copy View from DL to VP v2016.vwx Edited July 19, 2019 by MullinRJ Quote Link to comment
JBenghiat Posted July 22, 2019 Share Posted July 22, 2019 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. Quote Link to comment
Recommended Posts
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.