(command "-vpoint" "1,0,-1") return Nil (failed)

aridzv
edited January 2023 in LISP Codes
Hi.
I tried changing the viewpoint through a command ((command "-vpoint" "1,0,-1")) in a lisp and I'm getting Nil as return.
is there a way to use "-vpoint" command in a lisp?

thanks,
aridzv.

*edit:
for now I'm using a saved view by the name of "TOP-FRONT-RIGHT" and load it with this command:
(command-s "-v" "Restore" "TOP-FRONT-RIGHT")

Comments

  • Posted elsewhere ?

    (command "-vpoint" "1,0,-1") removed the extra brackets.
  • The extra brackets is not used in the code...
    And for your first question - yes.
    Since you and others insist it should work Maybe it is a bug - I'll send a support request.
    Thanks anyway.
  • (command ...) always returns nil, it does not mean the function or the command failed.
  • aridzv
    edited January 2023
    @Roy Klein Gebbinck
    Hi Roy and thanks for the reply.
    the command dosn't change the view point.
    about the Nil - it is true what you wrote,I've been explained erlier that if I add (princ) after the command in the lisp it will not return Nil.

    but still - when I run the command,both from command line and from a lisp it dosen't change the viewe point...

    regards,
    aridzv.

    EDIT:
    I must add that if I type the command in the command line an maually type the values it dose work...
    I just can't make it work through a lisp...
  • In V18 (command "-vpoint" "1,0,-1") works.
  • aridzv
    edited January 2023

    In V18 (command "-vpoint" "1,0,-1") works.

    so in v23 it is probably a bug (and also in V22...).
    I've sent a bug report to the support.

    in the mean time I aded views to my template file (named "TOP-FRONT-RIGHT" and "REG"),
    and then I use lee mac StealV1-8.lsp to load them to my drawings from the ON_DOC_LOAD.lsp and ON_START.lsp,
    and then change them from a lisp this way: (command-s "-v" "Restore" "TOP-FRONT-RIGHT")
  • the problem solved by bricscad support team.
    apperntaly my user profile was currpted in some way (maybe to much lisp experimants... :D ).
    I've re-load the default user profile and the command is working.