Code Red > AutoLISP (Vanilla / Visual)

Challenge: get an updated viewdir

(1/1)

Bryco:
Vba doesn't seem to have a way to get an updated viewdir, I'm hoping lisp has the wherewithall.
By updated I mean like viewctr, you pan or zoom and you get a new one.

CAB:
Not sure but are you looking for dxf code 16?

--- Quote ---16   View direction from target point (in WCS)
       DXF: X value; APP: 3D point
--- End quote ---

I did not see the vlisp property for this.
When the vp is active (getvar "VIEWDIR") returns ir for the vp.

Within paper space this will return it.

--- Code: --- (cdr (assoc 16 (entget (car(entsel)))))
--- End code ---

Bryco:
Cab, I'm using this in modelspace. Neither this (16)  or the getvar "viewdir" update with pan or zoom , (nor does target) but calling the camera command will show a new target and new camera.
 VIEWDIR System Variable                                                                                         
Stores the viewing direction in the current viewport expressed in UCS coordinates.
This describes the camera point as a 3D offset from the target point.
( The length from zero to the viewdir point=length of camera-target so I'm after the new length)

Navigation

[0] Message Index

Go to full version