jan_ek Posted December 6, 2018 Share Posted December 6, 2018 Hello I would like to save view position to txt file. What variables do I need to save? Quote Link to comment Share on other sites More sharing options...
marko_ribar Posted December 6, 2018 Share Posted December 6, 2018 PERSPECTIVE VIEWDIR VIEWCTR Basically VIEWCTR = TARGET, when UCS=WCS (mapcar '+ (getvar 'VIEWCTR) (getvar 'VIEWDIR)) = CAMERA, PERSPECTIVE (1= in perspective, 0= in parallel vector projection) Quote Link to comment Share on other sites More sharing options...
jan_ek Posted December 6, 2018 Author Share Posted December 6, 2018 Hello Thanks for quick answer but how restore this variable. Quote Link to comment Share on other sites More sharing options...
ronjonp Posted December 6, 2018 Share Posted December 6, 2018 You want to save the camera location to a text file? A quick properties dump has all the info I think you need: Quote ; IAcCameraWrapper: IAcCameraWrapper Interface ; Property values: ; Application (RO) = #<VLA-OBJECT IAcadApplication 00007ff633f06558> ; BackPlane = 0.0 ; Clipping = "Off" ; Document (RO) = #<VLA-OBJECT IAcadDocument 0000025166e7f698> ; EntityTransparency = "ByLayer" ; FieldOfView = 0.691111 ; FrameHeight = 4.35699 ; FrameWidth = 6.53549 ; FrontPlane = 0.0 ; Handle (RO) = "9E" ; HasExtensionDictionary (RO) = 0 ; Hyperlinks (RO) = #<VLA-OBJECT IAcadHyperlinks 000002516fa7e228> ; IsPlotable = 0 ; Layer = "*temporary_system_cameras_layer" ; LensLength = 50.0 ; Linetype = "ByLayer" ; LinetypeScale = 1.0 ; Lineweight = -1 ; Location = (2.76479 4.11262 0.0) ; Material = "ByLayer" ; Name = "Camera1" ; ObjectID (RO) = 43 ; ObjectName (RO) = "AcDbCamera" ; OwnerID (RO) = 44 ; PlotStyleName = "ByLayer" ; RollAngle = 0.0 ; Target = (11.4619 7.54752 0.0) ; TrueColor = #<VLA-OBJECT IAcadAcCmColor 000002516fa7e700> ; Visible = -1 ; Methods supported: ; ArrayPolar (3) ; ArrayRectangular (6) ; Copy () ; Delete () ; GetBoundingBox (2) ; GetExtensionDictionary () ; GetXData (3) ; Highlight (1) ; IntersectWith (2) ; Mirror (2) ; Mirror3D (3) ; Move (2) ; Rotate (2) ; Rotate3D (3) ; ScaleEntity (2) ; SetXData (2) ; TransformBy (1) ; Update () Quote Link to comment Share on other sites More sharing options...
marko_ribar Posted December 7, 2018 Share Posted December 7, 2018 6 hours ago, jan_ek said: Hello Thanks for quick answer but how restore this variable. I think you can use DVIEW command with PO - points option and enter coordinates... For perspective use (setvar 'perspective 1) or (setvar 'perspective 0)... Quote Link to comment Share on other sites More sharing options...
jan_ek Posted December 10, 2018 Author Share Posted December 10, 2018 Hello, I can not use this suggestions. Perhaps I have asked the question wrong or i don't understand answers I would like to: 1. Save view to file. 2. Load save file 3. Automatically rotate and zoom view (use variable to file). Quote Link to comment Share on other sites More sharing options...
David Bethel Posted December 10, 2018 Share Posted December 10, 2018 Have you looked into the view table. Command : _.VIEW -Save TEST Command : (tblsearch "VIEW" TEST) The table can be saved to a text file and fairly easily restored. -David Quote Link to comment Share on other sites More sharing options...
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.