Jump to content

need help - Failed to set vpoint in 3d model space


Recommended Posts

Posted (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 by aridzv
Posted

This feeds it a list rather then a string.

 

(command-s "-vpoint" '(1  0 -1))
Posted

@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?...

Posted (edited)

*Post removed* .. bad suggestion. 🤪

Edited by ronjonp
  • Like 1
  • Funny 1
Posted (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 by mhupp
Posted

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

Capture.JPG

Posted (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 by aridzv
Posted

Simple answer remove the spaces in your xyz then it will work.

 

(command "-vpoint" "1,0,-1") 

 

 

Posted
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...🙄

image.png.da9a0d57ba65b8cc9a0c2b5ff6b335fa.png

Posted (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 by aridzv
Posted

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"))

 

Posted

@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.

Posted

I only checked it on V22 and V23.

nevertheless, I submitted a support request to bricscad team.

Posted (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 by aridzv

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

×
×
  • Create New...