How to rotate view incrementally?

How to rotate view incrementally?

JoshBretscher
Enthusiast Enthusiast
1,835 Views
8 Replies
Message 1 of 9

How to rotate view incrementally?

JoshBretscher
Enthusiast
Enthusiast

I'm pretty new to autocad and was wandering if it's possible to rotate your view incrementally using arrow keys.  Essentially what I'm looking for would be the same thing as grabbing and dragging the handles on the free orbit circle, just done with arrow keys using incremental values, such as 5 degrees.  The previous program I used had a feature like this, and it was extremely useful for aligning lines precisely with point cloud data.  Is there a macro or feature out there like this?  I have Autocad 2019.

-----------------------------------------------------
Inventor 2018 Professional
0 Likes
1,836 Views
8 Replies
Replies (8)
Message 2 of 9

Patchy
Mentor
Mentor

3dorbit let you use the arrow key, but won't let you specify increment in degrees.

0 Likes
Message 3 of 9

JoshBretscher
Enthusiast
Enthusiast

Wow, kinda embarrassed to admit I didn't try using the arrows with it.  That's pretty close to what I'm looking for.  Do you know how the axes which it rotates around are determined?

-----------------------------------------------------
Inventor 2018 Professional
0 Likes
Message 4 of 9

Kent1Cooper
Consultant
Consultant

@JoshBretscher wrote:

I'm pretty new to autocad and was wandering if it's possible to rotate your view incrementally using arrow keys.  ....


 

Would +/- keys, or some other character-triggering keys, do?  I sort of know of a way it could be done, using (grread), but the arrow keys don't trigger anything in that.

 

If so, if you're talking about a Paper Space Viewport, would Rotating the whole Viewport do, or would you need it to rotate what's seen in  the Viewport without  Rotating the outline?  It could be done without that, using DVIEW and its TWist option, and perhaps by other means.

Kent Cooper, AIA
0 Likes
Message 5 of 9

JoshBretscher
Enthusiast
Enthusiast

Using the +/- keys would be fine.  Ideally this would be done in the modelspace.  It would be awesome if you could setup a UCS and then using the two keys quickly and easily rotate the view about one of the axes.

-----------------------------------------------------
Inventor 2018 Professional
0 Likes
Message 6 of 9

Anonymous
Not applicable

You can combine the ctrl key with the arrows, something like this:

 

(WHILE (/= 13 CHAR)                             ;<ENTER>

  (PROMPT "\n  <ENTER to quit> Your prompt")

  (SETQ CHAR (CAR (CDR (GRREAD NIL 2 1))))

(COND

((= CHAR -6)   ;(ctrl + LEFT ARROW) 

                   (COMMAND "Your command sequence"))

 

 ((= CHAR -7)   ;(ctrl + RIGHT ARROW)
                     (COMMAND "Your command sequence"))

 

 ((= CHAR -4)    ;(ctrl + UP ARROW)
                     (COMMAND "Your command sequence"))

 

 ((= CHAR -5)   ;(ctrl + DOWN ARROW)
                     (COMMAND "Your command sequence"))

 );COND
 );WHILE

 

Sorry for the formatting - quick copy paste with some editing

0 Likes
Message 7 of 9

Kent1Cooper
Consultant
Consultant

@JoshBretscher wrote:

Using the +/- keys would be fine.  Ideally this would be done in the modelspace.  It would be awesome if you could setup a UCS and then using the two keys quickly and easily rotate the view about one of the axes.


 

In the attached ViewTwist.lsp with its VT & VT0 commands, because it uses DVIEW, it can only  be done in Model Space.  It's about the VIEWTWIST System Variable, and twists [or spins] in DVIEW TWist-option fashion, without changing the current camera-to-target direction, so it doesn't do everything you're imagining, but if anyone's looking for this kind of functionality and finds this thread by its Subject, it should serve their purpose.

 

It has alternatives -- if you find the Up/Down or Right/Left arrow keys more intuitive than +/-, you can use them, though only in conjunction with the CTRL key.  And it exits with Enter or  Space or  either-case X.  Pressing 0 goes back to zero twist from anywhere, and there's a separate VT0 command to do that directly.

 

It saves your designated angular increment, to offer as default on subsequent use.

 

See the top of the file for more detail.

Kent Cooper, AIA
Message 8 of 9

JoshBretscher
Enthusiast
Enthusiast

Nice work.  This is almost exactly what I was seeking.  The only problem is since it's using VIEWTWIST it only rotates about the line of sight.  If there was a way to do this and determine the axis of rotation, it'd be perfect (primarily I'm trying to rotate around a vertical axis relative the point cloud data).

-----------------------------------------------------
Inventor 2018 Professional
0 Likes
Message 9 of 9

Kent1Cooper
Consultant
Consultant

@JoshBretscher wrote:

.... since it's using VIEWTWIST it only rotates about the line of sight.  If there was a way to do this and determine the axis of rotation, it'd be perfect (primarily I'm trying to rotate around a vertical axis relative the point cloud data).


Yeah, I took the easy route....  What you're describing can't be done with DVIEW's TWist option, but I think would require its POints or CAmera-&-TArget options, or maybe using VPOINT.  [It could be done with UCS, but that doesn't seem advisable, and would surely take longer.]  It would add a step, specifying the axis.  The calculation of the new viewpoint for each incremental rotation seems like the tough part to me, but should be possible.

Kent Cooper, AIA
0 Likes