Nuno Récio Posted January 6, 2016 Posted January 6, 2016 Hello, First of all, happy new year. Every time I have some new object to dimension i come up with this issue: I create dim lines to measure the sides by clicking point 1 to point 2 and then point 3 to define the offset of the dim line in regards to the object. The issue is that i want my dim lines to be equally offsetted from the object, and therefore i have to draw up the dim lines, then a circle with 'x' radius that I move around to manually adjust each of the dim lines to the desired offset distance position. Maybe be a silly way, but I've ran a check online for 2 or 3 times trying to find out an easier way to do this but I had no luck. Does anyone know a lisp that could set up the desired offset distance of the dim line for selected dimensions? Select dim lines > specify offset distance from object... I'm wasting too much time with this part of the job, and if anyone could help by pointing me the right way, I would be more than appreciated. Thx for your time Best regards, Nuno Quote
AdamW Posted January 3, 2019 Posted January 3, 2019 Try this (defun c:ndim-value (/ p1 p2 p3 Udist) (setq udist (getreal "\nOffset Distance :")) (setq p1 (getpoint "\n Specify first extension line origin :")) (setq p2 (getpoint "\n Specify first extension line origin :")) (setq P3 (polar P2 (+ (angle p1 p2)(/ pi 2)) udist)) (command "_.dimaligned" "_non" p1 "_non" p2 "_m" "" P3) (while (setq p1 (getpoint "\n Specify first extension line origin :")) (setq p2 (getpoint "\n Specify first extension line origin :")) (setq P3 (polar P2 (+ (angle p1 p2)(/ pi 2)) udist)) (command "_.dimaligned" "_non" p1 "_non" p2 "_m" "" P3) ) (princ) ) This works fine if there are no objects near where the dimension is placed because the osnaps (osmode) is not changed. type ndim-value to start just input the offset distance then start clicking on the objects to dimension enter to end. Its a bit rough and works for aligned dimensions linear change to dimlinear If you want the osnaps built in give me a little time just let me know 1 Quote
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.