ryan osmun Posted October 12, 2012 Author Posted October 12, 2012 ok i got it to work, i did it on a drawing that didnt have any of my settings and it worked, for some reason some setting on the templates i use it will not work with. ok nvm everything i said, the reason it wasnt working is because i have my circles as a block so therefore the reason it was working. i explode them and it worked perfect. sorry for the pain like i said im not the most CAD savvy! Quote
ReMark Posted October 12, 2012 Posted October 12, 2012 The dimstyle was standard not annotative. I double checked it by erasing the dimensions and going into dimstyle and resetting "standard" as "current". Quote
Tharwat Posted October 12, 2012 Posted October 12, 2012 ok i got it to work, i did it on a drawing that didnt have any of my settings and it worked, for some reason some setting on the templates i use it will not work with. Happy to hear that Ryan . Was it as you expected it ? Quote
ryan osmun Posted October 12, 2012 Author Posted October 12, 2012 Happy to hear that Ryan . Was it as you expected it ? thats awesome i think it works even better than the one created before!! my next question is how can i select multiple of the circles that i have as blocks to explode them all quick and easy so that i can use this efficiently? figured this out to haha! thank you!! Quote
Tharwat Posted October 12, 2012 Posted October 12, 2012 thats awesome i think it works even better than the one created before!! That's great . my next question is how can i select multiple of the circles that i have as blocks to explode them all quick and easy so that i can use this efficiently? That's the main headache of the code Explode the blocks that are represented as circles and use the code to create the dimensions . Quote
ryan osmun Posted October 12, 2012 Author Posted October 12, 2012 also if you wanted to touch it up, once you have selected one circle it cannot go back to that circle, if you could make it so that it can go back to ones that have already gone over that would be really good to. Quote
ReMark Posted October 12, 2012 Posted October 12, 2012 Maybe you could try restarting the command. Quote
ryan osmun Posted October 12, 2012 Author Posted October 12, 2012 yes that works, what about dimensioning to the perimeter from the circle, is there any solution that you would have for me? sometimes its a straight line sometimes its like an arched perimeter. Quote
ReMark Posted October 12, 2012 Posted October 12, 2012 How many requests are on this list of yours? Quote
ryan osmun Posted October 12, 2012 Author Posted October 12, 2012 i was simply just asking, the two lsp files you guys have given me are awesome. Quote
ReMark Posted October 12, 2012 Posted October 12, 2012 I just pointed you at a lisp routine. Tharwat has done all the grunt work. Gratis too. Quote
Tharwat Posted October 12, 2012 Posted October 12, 2012 also if you wanted to touch it up, once you have selected one circle it cannot go back to that circle, if you could make it so that it can go back to ones that have already gone over that would be really good to. Maybe you could try restarting the command. Here is my final modification for this and it could repeat as much as you want . (defun c:CirlesAutoDim (/ *error* c go p1 gr e ent dimension p2 lst ang) (vl-load-com) ;;; Tharwat Al Shoufi 12. 10. 2012 ;;; ;;; Create Dimensions between circles ;;; (defun *error* (x) (princ "\n *Cancel*") (princ)) (if (not acdoc) (setq acdoc (vla-get-activedocument (vlax-get-acad-object))) ) (setq spc (if (> (vla-get-activespace acdoc) 0) (vla-get-modelspace acdoc) (vla-get-paperspace acdoc) ) ) (prompt "\n Select start Circle ...") (if (setq c (ssget "_+.:S" '((0 . "CIRCLE")))) (progn (setq p1 (cdr (assoc 10 (entget (ssname c 0))))) (setq go t) (setq lst (cons (cdr (assoc -1 (entget (ssname c 0)))) lst) ) ) (princ "\n Nothing selected or not a Circle object ") ) (while (and go (eq 5 (car (setq gr (grread t 15 2))))) (redraw) (princ "\r Move cursor over circles to add dimension entity between them :" ) (if (and (setq e (ssget (cadr gr))) (eq (cdr (assoc 0 (setq ent (entget (ssname e 0))))) "CIRCLE" ) (not (member (cdr (assoc -1 ent)) lst)) ) (progn (setq dimension (vla-adddimaligned spc (vlax-3d-point p1) (vlax-3d-point (setq p2 (cdr (assoc 10 ent)))) (vlax-3d-point (setq p2 (cdr (assoc 10 ent)))) ) ) (setq ang (angle p1 p2)) (cond ((and (>= ang (/ pi 2.)) (<= ang (+ pi (/ pi 2.)))) (setq ang (+ ang pi)) ) ((= ang pi) (setq ang (- ang pi))) ((> ang 0.0) (setq ang (- ang (+ pi pi)))) ) (vla-put-textrotation dimension ang) (setq p1 p2) (setq lst (cons (cdr (assoc -1 ent)) lst)) (if (>= (length lst) 3) (setq lst (vl-remove (nth 0 (reverse lst)) lst)) ) ) ) ) (princ "\n Written by Tharwat Al Shoufi") (princ) ) Quote
ryan osmun Posted October 12, 2012 Author Posted October 12, 2012 again thanks a million that is great and will save me a ton of time! Quote
Tharwat Posted October 12, 2012 Posted October 12, 2012 again thanks a million that is great and will save me a ton of time! Enjoy it Ryan Best of luck . Tharwat 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.