|
Hi All!
(Sorry for the long explanation, I hope it helps.)
I have this little routine that takes an object, testing with horizontal rectangles, makes a copy directly on top of the original, rotates it up 90 degrees, and then moves it over a certain distance to the left of the original. I have a formula based on the "dimscale" system variable multiplied by 2. The drafting standard here for text and dimensions is for every 12 inches of overall length of part, increase the text and dimension size by factor of 1. So if the part is 24" to 35" for it longest side, the dimscale would be 2, the text and dimension sizes would be doubled. My results have been, for example, on a 10" x 5" rectangle, it gets moved 2.5" instead of 2". On a 30" x 15" rectangle, it gets moved 7.5" instead of 4". I can place a point at the lower left corner of the horizontal rectangle and using the data in the distance variable ("dist"), it will move it the proper distance. I don't know where the extra distance is coming from. How can it move the object 7.5" when the variable contains "@4.0
If anyone can assist, I would greatly appreciate it! The code is below:
[code](defun c:cprt (/ bpoint dist) (setvar "cmdecho" 0) (setq factor (getvar "dimscale")) (setq bpoint "0,0") (setq obj (ssget "X" '((8 . "0")))) (command "copy" obj "" bpoint bpoint "") (command "rotate" "P" "" bpoint "90") (setq dist (* factor 2)) (setq dist (strcat "@" (rtos dist 2 1) " |
|