Autocad Rotate Reference
Move, Rotate, and Scale with Align in AutoCAD. February 27, 2016. With “Align” you can move, rotate and scale an object while aligning it with existing geometry or selected points (even images and pdf underlays). The align command can be found on the ribbon Home tab under the Modify panel as shown in Figure 1 below. Select the viewport that you want to rotate. In the drawing area, right-click and choose Rotate. At the Specify base point: prompt, specify the base point in which to rotate the viewport around. At the Specify rotation angle or Copy/Reference: prompt, enter a rotation value or specify a second point to determine the angle of rotation.
I want to create a simple 'rotate' command with AutoLisp, so this is the code I wrote:
I insert two points, p1 and p2 and create a line which connects them. After that I create the ss1 object which is the line p1-p2. Finally I attempt to rotate the line from base point p2 for 90 degrees.
I insert the code in AutoCad, but instead of creating the rotated line, it asks to insert manually the base point as well as the angle, so I guess that there is a problem with the command 'rotate' ..
line.
Any suggestions would be appreciated.
user3060854user30608542 Answers
From what I've seen online, you have two problems.
ROTATE
does not take a selection set but an entity name
Missing an extra '
before the rotation point.
Reference: AutoLISP: Rotate Multiple Objects Around Their Base Point
As a side note, it usually helps me to try the command manually to make sure you are responding to all the correct prompts with the correct data/values.
crashmstrcrashmstrAutocad Rotate Reference Point
I would suggest the following simplified code:
This accounts for null user input at the prompts, uses a rubber-band for the second point prompt, allows for active Object Snap modes when supplying the point arguments to the commands (through the use of '_non'), and also allows for non-English versions of AutoCAD (through the use of an underscore), and potentially redefined commands (through the use of the '.' command prefix).
Electrical Engineering Principles & Applications 7th Edition – (eBook PDF). Authors: by Allan R. Hambley (Author) ISBN-13: 143. Be the first to review “Electrical Engineering Principles & Applications 7th Edition – (eBook PDF)” Cancel reply. PDFElectrical Engineering - Principles and Applications 5E Hambley PDFElectrical Engineering Principles and Applications (3rd Ed., Allan R. Hambley) PDFElectrical Engineering Principles and Applications (4th Ed., Allan R. Hambley) PDFElectrical Machines, Drives. Hambley 7th edition.
This could be further improved by temporarily setting the CMDECHO system variable to 0 to suppress command-line echoing.
Lee MacLee Mac