1. question about degrees in turning instead of fixed degrees turning in viewport

Hai guys,
How can I, instead of a fixed 90 degrees, make it a question of how much degrees it's going to be?
So that I don't have to use 3 scripts.

Code:
```(DEFUN C:viewportrotate90 ()
(SETVAR "CMDECHO" 0)
(COMMAND "PSPACE")
(COMMAND "-vports" "lock" "off" "all" "")

(COMMAND "MSPACE")
(command "ucsicon" "on")
(command "dview" "" "tw" "90" "")

(COMMAND "-vports" "lock" "on" "all" "")
(COMMAND "MSPACE")
(command "ucs" "view")

(setvar "cmdecho" 1)

(princ "\nViewport rotated to UCS 90.")
(PRINC))```

2. Re: question about degrees in turning instead of fixed degrees turning in viewport

Hi,

Have a look at the getangle (and getorient) function.

3. Re: question about degrees in turning instead of fixed degrees turning in viewport

I'm not that good at it, that's why I'm asking those questions. In that case 2 out of 5 problems are solved.

4. Re: question about degrees in turning instead of fixed degrees turning in viewport

something like this:

Code:
```(DEFUN C:viewportrotate (/ ang)
(SETVAR "CMDECHO" 0)
(COMMAND "_PSPACE")
(COMMAND "_-vports" "_lock" "_off" "_all" "")

(setq ang (getangle "\nSpecify Rotation angle: "))

(COMMAND "_MSPACE")
(command "_ucsicon" "_on")
(command "_dview" "" "_tw" (angtos ang) "")

(COMMAND "_-vports" "_lock" "_on" "_all" "")
(COMMAND "_MSPACE")
(command "_ucs" "_view")

(setvar "cmdecho" 1)

(princ (strcat "\nViewport rotated to UCS " (angtos ang)))
(PRINC)
)```

5. Re: question about degrees in turning instead of fixed degrees turning in viewport

Why not try a macro:
Code:
` -vports;_lock;_ON;;_dview;all;;tw;\;^P(progn(setvar "snapang" (- (getvar "viewtwist")))(princ))`
I never lock my viewports, save a lot of MS views to protect my work instead. As easy as they are to lock/unlock simply locking a viewport wouldn't make me feel very secure.

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•