drafter_joe Posted November 30, 2016 Share Posted November 30, 2016 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: (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) "<180")) (command "move" "P" "" bpoint dist) (setvar "cmdecho" 1) (princ) ) Quote Link to comment Share on other sites More sharing options...
Roy_043 Posted November 30, 2016 Share Posted November 30, 2016 see: https://www.theswamp.org/index.php?topic=51955.msg569852#msg569852 Quote Link to comment Share on other sites More sharing options...
drafter_joe Posted November 30, 2016 Author Share Posted November 30, 2016 (edited) Thanks Roy_043! I took a quick look at the link you posted. Were you referring to the osnaps, or was it something else and I missed it? Just wondering. It appears to be the osnap issue! Great shot Red 5! I mean Roy_043! and Edited November 30, 2016 by drafter_joe After trying the _non osnap Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.