aridzv Posted January 6, 2023 Share Posted January 6, 2023 (edited) Hi. I'm trying to set the view point to "TOP-FRONT-RIGHT" with this line of code in my lisp: (command-s "-vpoint" "1, 0, -1");;change view point to "TOP-FRONT-RIGHT" but I'm getting this massege: : (command-s "-vpoint" "1, 0, -1") : -vpoint Set view point or [Rotate/PLan view/PErspective] <0, 0, 1>:1, 0, -1nil what am i doing wrong?... thanks, aridzv. Edited January 6, 2023 by aridzv Quote Link to comment Share on other sites More sharing options...
mhupp Posted January 6, 2023 Share Posted January 6, 2023 This feeds it a list rather then a string. (command-s "-vpoint" '(1 0 -1)) Quote Link to comment Share on other sites More sharing options...
aridzv Posted January 6, 2023 Author Share Posted January 6, 2023 @mhupp thanks. I've tried it (actually I've tried it before posting this qution..) and getting the same error: : (command-s "-vpoint" '(1 0 -1)) : -vpoint Set view point or [Rotate/PLan view/PErspective] <0, 0, 1>:nil why is that?... Quote Link to comment Share on other sites More sharing options...
ronjonp Posted January 6, 2023 Share Posted January 6, 2023 (edited) *Post removed* .. bad suggestion. Edited January 6, 2023 by ronjonp 1 1 Quote Link to comment Share on other sites More sharing options...
mhupp Posted January 6, 2023 Share Posted January 6, 2023 (edited) whats the error? not changing it or are you lookin at the nil? because It's changing it on this end. the nil is just being output because its lacking a (princ) (defun C:test () (command-s "-vpoint" '(1 0 -1)) (princ) ) Edited January 6, 2023 by mhupp Quote Link to comment Share on other sites More sharing options...
aridzv Posted January 6, 2023 Author Share Posted January 6, 2023 strangly it dosen't want to work... 1. here is the full lisp tht I'm using: (defun c:chtmd () (command "workspace" "C" "Mechanical") (princ) (command "-VISUALSTYLES" "_c" "o" "Modeling") ;; change visual style to modeling (princ) (command-s "-vpoint" '(1 -1 1)) ;; CHANGE VIEWPORT TO "TOP-FRONT-RIGHT" (princ) (SETVAR "UCSDETECT" 3) (SETVAR "QUADDISPLAY" 5) (princ) ) second, see the attached screenshot: the lisp change the work space to Mechanical and the VISUALSTYLE to modeling, but fail to change the viewpoint... aridzv Quote Link to comment Share on other sites More sharing options...
aridzv Posted January 6, 2023 Author Share Posted January 6, 2023 (edited) 58 minutes ago, ronjonp said: *Post removed* .. bad suggestion. good one.... And on a slightly more serious note: I move a lot between workspaces, and in each transition I need to perform three main actions: 1. changing the workspace. 2. changing the Visual style. 3. changing the point of view. and on top of that also to change two variables. A total of 5 actions. The intention is to save those five actions and reduce them to one mouse click. aridzv Edited January 6, 2023 by aridzv Quote Link to comment Share on other sites More sharing options...
BIGAL Posted January 6, 2023 Share Posted January 6, 2023 Simple answer remove the spaces in your xyz then it will work. (command "-vpoint" "1,0,-1") Quote Link to comment Share on other sites More sharing options...
aridzv Posted January 6, 2023 Author Share Posted January 6, 2023 24 minutes ago, BIGAL said: Simple answer remove the spaces in your xyz then it will work. (command "-vpoint" "1,0,-1") that was my firs try.... nop,it dosen't... Quote Link to comment Share on other sites More sharing options...
aridzv Posted January 6, 2023 Author Share Posted January 6, 2023 (edited) O.K. Got it... It is necessary to load a saved view. 1. set the required view by using the "LOOKFROM" widget on the top-right corner of the screen or in any other way. 2. use the "VIEW" command to open the drawing explorer in the "VIEWS" tab. 3. create a new view and copy it's name (I saved it as "TOP-FRONT-RIGHT"). 4. the command to use it in: (command-s "-v" "Restore" "TOP-FRONT-RIGHT") ;; CHANGE VIEWPOINT TO "TOP-FRONT-RIGHT" (command "zoom" "e");; zomm to extened just to be sure that all the drawing is shown Edited January 6, 2023 by aridzv Quote Link to comment Share on other sites More sharing options...
BIGAL Posted January 7, 2023 Share Posted January 7, 2023 View is reset and worked properly as suggested. A bit of code from a program written like 20 years ago. (if (= look "R")(command-s "-vpoint" "1,0,0")) (if (= look "L")(command-s "-vpoint" "-1,0,0")) (if (= look "F")(command-s "-vpoint" "0,-1,0")) (if (= look "B")(command-s "-vpoint" "0,1,0")) (if (= look "P")(command-s "-vpoint" "0,0,1")) Quote Link to comment Share on other sites More sharing options...
aridzv Posted January 7, 2023 Author Share Posted January 7, 2023 @BIGAL Since you and @mhupp insist that it should work I suspect it is a bug and I'll send a support request to bricscad team. Thanks any way. aridzv. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted January 7, 2023 Share Posted January 7, 2023 I am using Bricscad V20 and works fine. Quote Link to comment Share on other sites More sharing options...
aridzv Posted January 8, 2023 Author Share Posted January 8, 2023 I only checked it on V22 and V23. nevertheless, I submitted a support request to bricscad team. Quote Link to comment Share on other sites More sharing options...
aridzv Posted January 9, 2023 Author Share Posted January 9, 2023 (edited) the problem solved by bricscad support team. apperntaly my user profile was currpted in some way (maybe to much lisp experimants... ). I've re-load the default user profile and the command is working. Edited January 9, 2023 by aridzv 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.