Lee Mac Posted March 21, 2009 Posted March 21, 2009 Maybe others can offer some suggestions as to why the Dims are not being created as Associative.. Quote
ichlove Posted March 22, 2009 Posted March 22, 2009 Hi, How about just make draworder,like layer 1 above layer 2;layer 2 above layer 3,layer 3 above layer 4,etc.can you help me to make this ? thanks Quote
Lee Mac Posted March 22, 2009 Posted March 22, 2009 Ichove, is this related to this thread? Or is it a new question entirely? Quote
SEGUL Posted April 1, 2009 Posted April 1, 2009 Hi Lee Mac.....have tried your lisp codes.....somehow it does not work on poly lines.....would you be able to assist or have a lisp code that can: 1. show dimensions - with and without bearings 2. dimesion of only a selected polyline 3. dimension of all proposed polyline to where other lines intersect with the selected poly line. i look forward to your kind help:unsure: Quote
Lee Mac Posted April 1, 2009 Posted April 1, 2009 Hi Lee Mac.....have tried your lisp codes.....somehow it does not work on poly lines.... It should work on polylines... - it only uses the vla-getBoundingBox function which will work on all drawing objects... What error is occurring? Quote
SEGUL Posted April 1, 2009 Posted April 1, 2009 Hi Lee I have a polyline which has about 18 face sides @ differant angles and when i use the "DIMBLK" lisp command i get only two right angled triangled dimensions. Quote
SEGUL Posted April 1, 2009 Posted April 1, 2009 Hi Lee I have a polyline which has about 18 face sides @ differant angles and when i use the "DIMBLK" lisp command i get only two right angled triangled dimensions. Quote
Lee Mac Posted April 2, 2009 Posted April 2, 2009 Hi Lee I have a polyline which has about 18 face sides @ differant angles and when i use the "DIMBLK" lisp command i get only two right angled triangled dimensions. Yes, that is all that my dimension LISP does. Quote
SEGUL Posted April 2, 2009 Posted April 2, 2009 Hi Lee Mac my bad on the confusion of the lisp codes.....would you have a lips code that would be able to auto dimension along the face of each polyline with bearing included Quote
Lee Mac Posted April 2, 2009 Posted April 2, 2009 ASMI's code I think already does this and would be better than I could code Quote
SEGUL Posted April 2, 2009 Posted April 2, 2009 Thanks Lee Mac i have tried ASMI's code and it works great.....its that the txt on some line faces do not centre on the dimension.....but dont worry at least all the lines have been dimensioned as i wanted..... Cheers and many thanks again for you kind help..... Quote
SEGUL Posted April 2, 2009 Posted April 2, 2009 Hi Lee Mac......would you have a code similar to ASMI's code which would include bearings of the lines or polylines? Quote
Lee Mac Posted April 3, 2009 Posted April 3, 2009 Hi Lee Mac......would you have a code similar to ASMI's code which would include bearings of the lines or polylines? I don't have one atm, but I could try to make one Quote
SEGUL Posted April 6, 2009 Posted April 6, 2009 Thank you very much Lee Mac.....that would be greatly appreciated.....the lisp commands have helped me alot in my work.... Quote
Lee Mac Posted April 6, 2009 Posted April 6, 2009 Perhaps this? ;; ============================================================ ;; ;; ;; ;; PDIM.LSP - This lisp is for dimensioning of several ;; ;; LwPolylines simultaneously. The program works ;; ;; with the current dimensional style. ;; ;; The distance of the dimensional text from a ;; ;; polyline is equal to the height of the ;; ;; dimensional text (DIMTEXT system variable) ;; ;; multiplied by a variable 'tOff'. ;; ;; You can change value of 'tOff' in the ;; ;; program beginning, after the note. ;; ;; ;; ;; ============================================================ ;; ;; ;; ;; Command(s) to call: PDIM ;; ;; ;; ;; Select LwPolylines and press Enter. ;; ;; ;; ;; ============================================================ ;; ;; ;; ;; THIS PROGRAM AND PARTS OF IT MAY REPRODUCED BY ANY METHOD ;; ;; ON ANY MEDIUM FOR ANY REASON. YOU CAN USE OR MODIFY THIS ;; ;; PROGRAM OR PARTS OF IT ABSOLUTELY FREE. ;; ;; ;; ;; THIS PROGRAM PROVIDES THIS PROGRAM 'AS IS' WITH ALL FAULTS ;; ;; AND SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF ;; ;; MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. ;; ;; ;; ;; ============================================================ ;; ;; ;; ;; V1.2, 9th Okt 2008, Riga, Latvia ;; ;; © Aleksandr Smirnov (ASMI) ;; ;; For AutoCAD 2000 - 2008 (isn't tested in a next versions) ;; ;; ;; ;; http://www.asmitools.com ;; ;; ;; ;; ============================================================ ;; (defun c:pdim (/ tOff plSet pLlst vLst oldDss cAng cDis cPt) ; NOTE ; ; The distance of the text from a LwPolyline line is equal ; of multiplication of system variable 'DIMTXT' (height of ; the dimensional text) on a variable 'tOff'. Change this ; variable to change this distance. (setq tOff 1.0) (princ "\n<<< Select LwPolyline for dimensioning >>> ") (if (setq plSet (ssget '((0 . "LWPOLYLINE")))) (progn (setq pLlst (vl-remove-if 'listp (mapcar 'cadr (ssnamex plSet))) oldDss (getvar "DIMASSOC")) (setvar "CMDECHO" 0) (command "_.undo" "_be") (setvar "DIMASSOC" 2) (foreach pl pLlst (setq vLst (mapcar '(lambda(x) (trans x 0 1)) (mapcar 'cdr (vl-remove-if-not '(lambda(x) (= 10(car x))) (entget pl))))) (if (equal '(70 . 1) (assoc 70 (entget pl))) (setq vLst (append vLst (list (car vLst))))) (while (< 1 (length vLst)) (setq cAng (angle (car vLst) (cadr vLst)) cDis (/ (distance (car vLst) (cadr vLst)) 2)) (if (>= (caar vLst) (caadr vLst)) (setq cAng (- cAng pi))) (setq cPt (polar (polar (car vLst) cAng cDis) (+ cAng (* 0.5 pi)) (* 1.0 (getvar "DIMTXT"))) bPt (polar (polar (car vLst) cAng cDis) (+ cAng (* 0.5 pi)) (* 3.0 (getvar "DIMTXT")))) (command "_.dimaligned" "_end" (car vLst) "_end" (cadr vLst) "_none" cPt) (Make_Text bPt (strcat (angtos cAng 0 2) "%%D") cAng) (setq vLst (cdr vLst)))) (setvar "DIMASSOC" oldDss) (command "_.undo" "_e") (setvar "CMDECHO" 1))) (princ)) (princ "\n*** Type PDIM for multiple LwPolyline dimensioning *** ") (defun Make_Text (pt val rot) (entmake (list '(0 . "TEXT") '(8 . "0") (cons 10 pt) (cons 40 (getvar "TEXTSIZE")) (cons 1 val) (cons 50 rot) (cons 7 (getvar "TEXTSTYLE")) '(71 . 0) '(72 . 1) '(73 . 1) (cons 11 pt)))) Quote
SEGUL Posted April 6, 2009 Posted April 6, 2009 Thanks Lee Mac Sorry if iam asking for to much.....the lisp works great.....would you be able to include "minutes & seconds" after degress? Quote
Lee Mac Posted April 6, 2009 Posted April 6, 2009 OK: ;; ============================================================ ;; ;; ;; ;; PDIM.LSP - This lisp is for dimensioning of several ;; ;; LwPolylines simultaneously. The program works ;; ;; with the current dimensional style. ;; ;; The distance of the dimensional text from a ;; ;; polyline is equal to the height of the ;; ;; dimensional text (DIMTEXT system variable) ;; ;; multiplied by a variable 'tOff'. ;; ;; You can change value of 'tOff' in the ;; ;; program beginning, after the note. ;; ;; ;; ;; ============================================================ ;; ;; ;; ;; Command(s) to call: PDIM ;; ;; ;; ;; Select LwPolylines and press Enter. ;; ;; ;; ;; ============================================================ ;; ;; ;; ;; THIS PROGRAM AND PARTS OF IT MAY REPRODUCED BY ANY METHOD ;; ;; ON ANY MEDIUM FOR ANY REASON. YOU CAN USE OR MODIFY THIS ;; ;; PROGRAM OR PARTS OF IT ABSOLUTELY FREE. ;; ;; ;; ;; THIS PROGRAM PROVIDES THIS PROGRAM 'AS IS' WITH ALL FAULTS ;; ;; AND SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF ;; ;; MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. ;; ;; ;; ;; ============================================================ ;; ;; ;; ;; V1.2, 9th Okt 2008, Riga, Latvia ;; ;; © Aleksandr Smirnov (ASMI) ;; ;; For AutoCAD 2000 - 2008 (isn't tested in a next versions) ;; ;; ;; ;; http://www.asmitools.com ;; ;; ;; ;; ============================================================ ;; (defun c:pdim (/ tOff plSet pLlst vLst oldDss cAng cDis cPt) ; NOTE ; ; The distance of the text from a LwPolyline line is equal ; of multiplication of system variable 'DIMTXT' (height of ; the dimensional text) on a variable 'tOff'. Change this ; variable to change this distance. (setq tOff 1.0) (princ "\n<<< Select LwPolyline for dimensioning >>> ") (if (setq plSet (ssget '((0 . "LWPOLYLINE")))) (progn (setq pLlst (vl-remove-if 'listp (mapcar 'cadr (ssnamex plSet))) oldDss (getvar "DIMASSOC")) (setvar "CMDECHO" 0) (command "_.undo" "_be") (setvar "DIMASSOC" 2) (foreach pl pLlst (setq vLst (mapcar '(lambda(x) (trans x 0 1)) (mapcar 'cdr (vl-remove-if-not '(lambda(x) (= 10(car x))) (entget pl))))) (if (equal '(70 . 1) (assoc 70 (entget pl))) (setq vLst (append vLst (list (car vLst))))) (while (< 1 (length vLst)) (setq cAng (angle (car vLst) (cadr vLst)) cDis (/ (distance (car vLst) (cadr vLst)) 2)) (if (>= (caar vLst) (caadr vLst)) (setq cAng (- cAng pi))) (setq cPt (polar (polar (car vLst) cAng cDis) (+ cAng (* 0.5 pi)) (* 1.0 (getvar "DIMTXT"))) bPt (polar (polar (car vLst) cAng cDis) (+ cAng (* 0.5 pi)) (* 3.0 (getvar "DIMTXT")))) (command "_.dimaligned" "_end" (car vLst) "_end" (cadr vLst) "_none" cPt) (Make_Text bPt (strcat (angtos cAng 0 2) "%%D" (chr 32) (angtos cAng 1 3)) cAng) (setq vLst (cdr vLst)))) (setvar "DIMASSOC" oldDss) (command "_.undo" "_e") (setvar "CMDECHO" 1))) (princ)) (princ "\n*** Type PDIM for multiple LwPolyline dimensioning *** ") (defun Make_Text (pt val rot) (entmake (list '(0 . "TEXT") '(8 . "0") (cons 10 pt) (cons 40 (getvar "TEXTSIZE")) (cons 1 val) (cons 50 rot) (cons 7 (getvar "TEXTSTYLE")) '(71 . 0) '(72 . 1) '(73 . 1) (cons 11 pt)))) Quote
SEGUL Posted April 6, 2009 Posted April 6, 2009 Hi Lee Mac The Lisp works great.....but I have two degree readings with the minutes and seconds.........could there be only one degree reading? Sorry for the confusion Quote
Lee Mac Posted April 6, 2009 Posted April 6, 2009 Hi Lee Mac The Lisp works great.....but I have two degree readings with the minutes and seconds.........could there be only one degree reading? Sorry for the confusion Sorry, my misinterpretation - shall post new code Quote
Lee Mac Posted April 6, 2009 Posted April 6, 2009 ;; ============================================================ ;; ;; ;; ;; PDIM.LSP - This lisp is for dimensioning of several ;; ;; LwPolylines simultaneously. The program works ;; ;; with the current dimensional style. ;; ;; The distance of the dimensional text from a ;; ;; polyline is equal to the height of the ;; ;; dimensional text (DIMTEXT system variable) ;; ;; multiplied by a variable 'tOff'. ;; ;; You can change value of 'tOff' in the ;; ;; program beginning, after the note. ;; ;; ;; ;; ============================================================ ;; ;; ;; ;; Command(s) to call: PDIM ;; ;; ;; ;; Select LwPolylines and press Enter. ;; ;; ;; ;; ============================================================ ;; ;; ;; ;; THIS PROGRAM AND PARTS OF IT MAY REPRODUCED BY ANY METHOD ;; ;; ON ANY MEDIUM FOR ANY REASON. YOU CAN USE OR MODIFY THIS ;; ;; PROGRAM OR PARTS OF IT ABSOLUTELY FREE. ;; ;; ;; ;; THIS PROGRAM PROVIDES THIS PROGRAM 'AS IS' WITH ALL FAULTS ;; ;; AND SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF ;; ;; MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. ;; ;; ;; ;; ============================================================ ;; ;; ;; ;; V1.2, 9th Okt 2008, Riga, Latvia ;; ;; © Aleksandr Smirnov (ASMI) ;; ;; For AutoCAD 2000 - 2008 (isn't tested in a next versions) ;; ;; ;; ;; http://www.asmitools.com ;; ;; ;; ;; ============================================================ ;; (defun c:pdim (/ tOff plSet pLlst vLst oldDss cAng cDis cPt) ; NOTE ; ; The distance of the text from a LwPolyline line is equal ; of multiplication of system variable 'DIMTXT' (height of ; the dimensional text) on a variable 'tOff'. Change this ; variable to change this distance. (setq tOff 1.0) (princ "\n<<< Select LwPolyline for dimensioning >>> ") (if (setq plSet (ssget '((0 . "LWPOLYLINE")))) (progn (setq pLlst (vl-remove-if 'listp (mapcar 'cadr (ssnamex plSet))) oldDss (getvar "DIMASSOC")) (setvar "CMDECHO" 0) (command "_.undo" "_be") (setvar "DIMASSOC" 2) (foreach pl pLlst (setq vLst (mapcar '(lambda(x) (trans x 0 1)) (mapcar 'cdr (vl-remove-if-not '(lambda(x) (= 10(car x))) (entget pl))))) (if (equal '(70 . 1) (assoc 70 (entget pl))) (setq vLst (append vLst (list (car vLst))))) (while (< 1 (length vLst)) (setq cAng (angle (car vLst) (cadr vLst)) cDis (/ (distance (car vLst) (cadr vLst)) 2)) (if (>= (caar vLst) (caadr vLst)) (setq cAng (- cAng pi))) (setq cPt (polar (polar (car vLst) cAng cDis) (+ cAng (* 0.5 pi)) (* 1.0 (getvar "DIMTXT"))) bPt (polar (polar (car vLst) cAng cDis) (+ cAng (* 0.5 pi)) (* 3.0 (getvar "DIMTXT")))) (command "_.dimaligned" "_end" (car vLst) "_end" (cadr vLst) "_none" cPt) (Make_Text bPt (angtos cAng 1 3) cAng) (setq vLst (cdr vLst)))) (setvar "DIMASSOC" oldDss) (command "_.undo" "_e") (setvar "CMDECHO" 1))) (princ)) (princ "\n*** Type PDIM for multiple LwPolyline dimensioning *** ") (defun Make_Text (pt val rot) (entmake (list '(0 . "TEXT") '(8 . "0") (cons 10 pt) (cons 40 (getvar "TEXTSIZE")) (cons 1 val) (cons 50 rot) (cons 7 (getvar "TEXTSTYLE")) '(71 . 0) '(72 . 1) '(73 . 1) (cons 11 pt)))) 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.