Search the Community
Showing results for tags 'negative'.
Found 2 results
Help with block scale and rotate(again)
hildebran posted a topic in AutoLISP, Visual LISP & DCLGreetings all, i work with AUtoCAD MEP and use "devices" regularly. We normally convert the consultants electrical blocks to devices and do what we do but on this project half of the the consultants blocks are mirrored. The problem occurs when the conversion to MEP device happens. The devices are created 180 degrees out of rotation from the original block. This means the roughly 1200 devices of 20 different types need to be manually rotated. Ugh! I saw this thread below which is the closest i have found to a solution. http://www.cadtutor.net/forum/showthread.php?54913-Rotate-multiple-blocks-around-their-individual-origin-point I dont know LISP other than a minor tweak here and there. What im hoping someone has is a LISP routine the cloely does the following. Select blocks with negative "x" scale get rotation value "RO" get scale value "SC" While there are blocks with a negative "x" scale invert scale rotate 180 degrees relative to original rotation value"RO" Thanks for you time all!
Lisp to report negative area for a polyline
EricL posted a topic in AutoLISP, Visual LISP & DCLHello, I am working in AutoCAD 2010 and am looking for a LISP routine to report the area of counterclockwise polyline loops as a positive value and clockwise polyline loops as a negative value(as with the right hand rule). For example, if I have a poly line that crosses over itself multiple times creating several loops of different areas with the majority of the area coming from clockwise loops I would want the total area reported as a negative value instead of the absolute value that is reported in the propertes of the line. Does anybody know of anything that fits the bill? Thanks