@Anonymous wrote:
... you could use the vla-move command as follows:
Given e is bound to an ename, p1 is bound to a point list, and p2 is bound to a point list
(vla-move (vlax-ename->vla-object e) (vlax-3d-point p1) (vlax-3d-point p2))
....
If you have ... an angle in radians and distance instead of 2 points, then get point p2 by:
(setq p2 (polar p1 ang dist))
....
If you're going to Move it after all, rather than replace locational entries in entity data, the (command) function is a lot easier. No dealing with VLA object conversion, variants, 3D points when you're operating only in 2D, etc. Given two known points:
(command "_.move" e "" p1 p2)
[with "_none" Osnap calls before those points if running Object Snap might be on]. Given a known distance and angle [original concept, Post 1]:
(command "_.move" e "" '(0 0 0) "@YourDistance<YourAngle")
[again accounting for Osnap if necessary] which will take the angle in degrees if those are your current angle units [no radians conversion required], and with no need to know or calculate any points at all [that '(0 0 0) can be anywhere -- (getvar 'viewctr), or "@", or...].
Or, using the first-"point"-is-really-displacement approach:
(command "_.move" e "" (polar '(0 0 0) YourAngle YourDistance) "")
[which will want the angle in radians].
Kent Cooper, AIA