lucas3 Posted December 25, 2013 Share Posted December 25, 2013 Mouse click on the chamfer line , automatic dimensions chamfer size Support Pline, line, Quote Link to comment Share on other sites More sharing options...
lucas3 Posted December 26, 2013 Author Share Posted December 26, 2013 Mouse click on the chamfer line , automatic dimensions chamfer sizeSupport Pline, line, [ATTACH=CONFIG]45905[/ATTACH] help!who can help me? thank you! Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted December 26, 2013 Share Posted December 26, 2013 What code do you have so far that you need help with? Quote Link to comment Share on other sites More sharing options...
ReMark Posted December 26, 2013 Share Posted December 26, 2013 I don't think he has any code. I also think the OP is using CADTutor to answer questions at a bulletin board that he is involved with (i.e. - he's asking on behalf of other people). Quote Link to comment Share on other sites More sharing options...
lucas3 Posted December 26, 2013 Author Share Posted December 26, 2013 What code do you have so far that you need help with? Hi lee,Thank you for your reply! (defun c:tt (/ en en_data pt0 endpt1 endpt2 cjsl endpt1x endpt1y endpt2x endpt2y dinpt cl cl1 cl2 txt pt3 pt4 pt3x ang1 pt5 pt6 pt6x l pt7 ang2 l1 n l2 th pt8 pt9 pt10 ggg v2 v3 os) (setq olderr *error* *error* myerr ) (vl-load-com) (setq os (getvar "osmode")) (setq v2 (getvar "dimstyle")) (setq v3 (getvar "blipmode")) (setvar "osmode" 0) (setvar "cmdecho" 0) (setvar "blipmode" 0) (graphscr) (setq en (entsel "\nChoose chamfer edge!")) (setq en_data (entget (car en))) (setq pt0 (list (car (cadr en)) (cadr (cadr en)))) (setq endpt1 (list (car (cdr (assoc 10 en_data))) (cadr (cdr (assoc 10 en_data))) ) ) (setq endpt2 (list (car (cdr (assoc 11 en_data))) (cadr (cdr (assoc 11 en_data))) ) ) (setq endpt1x (car (cdr (assoc 10 en_data)))) (setq endpt1y (cadr (cdr (assoc 10 en_data)))) (setq endpt2x (car (cdr (assoc 11 en_data)))) (setq endpt2y (cadr (cdr (assoc 11 en_data)))) (setq dinpt (list endpt1x endpt2y)) (setq cl (distance endpt1 dinpt)) (setq cl3 (distance endpt2 dinpt)) (setvar "dimdec" 2) (setvar "dimzin" (if (equal cl cl3 0.05) (progn (setvar "dimzin" (setq cjsl (getstring "\nInput Quantity!")) (setq cl2 (rtos cl )) (setq ggg "-") (if (or (= cjsl "") (= cjsl nil)) (setq ggg "") ) (setq txt (strcat cjsl ggg "C" cl2)) (setq pt3 (list (car (osnap pt0 "endpoint")) (cadr (osnap pt0 "endpoint")) ) ) (setq pt4 (list (car (osnap pt0 "midpoint")) (cadr (osnap pt0 "midpoint")) ) ) (setq pt3x (car pt3)) (setq ang1 (angle pt4 pt3)) (vl-cmdf "ortho" "off") (setq pt5 (getpoint pt3 "\nChoose placement")) ; (setq pt6 (list (car pt5) (cadr pt5))) ; (setq pt6x (car pt6)) ; (setq l (distance pt3 pt6)) ; (setq pt7 (polar pt3 ang1 l)) (setq ang2 (cond ((> pt6x pt3x) 0) ((< pt6x pt3x) pi) (t 0) ) ) (setq l1 (strlen txt)) (setq n (getvar 'dimscale)) (setq l2 (* l1 n 2)) (setq th (* 3 n)) (setq pt8 (polar pt7 ang2 l2)) (if (not (tblsearch "LAYER" "dim")) (vl-cmdf "layer" "m" "dim" "c" "7" "" "l" "continuous" "" "") ) (setvar "clayer" "dim") (vl-cmdf "pline" pt3 pt7 pt8 "") (setq pt9 (osnap pt8 "midpoint")) (setq pt10 (polar pt9 (/ pi 2) (/ th 2))) (if (not (tblsearch "style" "gb")) (vl-cmdf "style" "GB" "gbenor,gbcbig" "" "1" "" "" "") ) (vl-cmdf "text" "s" "gb" "j" "m" pt10 th 0 txt) ) (progn (setvar "dimzin" (setq cl2 (rtos cl)) (setq cl4(rtos cl3)) (setq ggg "x") (setq txt (strcat cl2 ggg cl4)) (setq pt3 (list (car (osnap pt0 "endpoint")) (cadr (osnap pt0 "endpoint")) ) ) ; (setq pt4 (list (car (osnap pt0 "midpoint")) (cadr (osnap pt0 "midpoint")) ) ) ; (setq pt3x (car pt3)) (setq ang1 (angle pt4 pt3)) ; (vl-cmdf "ortho" "off") (setq pt5 (getpoint pt3 "\nChoose placement")) ; (setq pt6 (list (car pt5) (cadr pt5))) ; (setq pt6x (car pt6)) ; (setq l (distance pt3 pt6)) ; (setq pt7 (polar pt3 ang1 l)) (setq ang2 (cond ((> pt6x pt3x) 0) ((< pt6x pt3x) pi) (t 0) ) ) (setq l1 (strlen txt)) (setq n (getvar 'dimscale)) (setq l2 (* l1 n 2)) (setq th (* 3 n)) (setq pt8 (polar pt7 ang2 l2)) (if (not (tblsearch "LAYER" "dim")) (vl-cmdf "layer" "m" "dim" "c" "7" "" "l" "continuous" "" "") ) (setvar "clayer" "dim") (vl-cmdf "pline" pt3 pt7 pt8 "") (setq pt9 (osnap pt8 "midpoint")) (setq pt10 (polar pt9 (/ pi 2) (/ th 2))) (if (not (tblsearch "style" "gb")) (vl-cmdf "style" "GB" "gbenor,gbcbig" "" "1" "" "" "") ) (vl-cmdf "text" "s" "gb" "j" "m" pt10 th 0 txt) ) ) (vl-cmdf "-dimstyle" "r" v2) (setvar "blipmode" v3); (PRINT) (prompt "Chamfer dimension") (myerr) (princ) ; ) (defun myerr (msg) (setvar "osmode" os) (setq *error* olderr) (princ) ) Quote Link to comment Share on other sites More sharing options...
ReMark Posted December 26, 2013 Share Posted December 26, 2013 I was wrong. He does have some code. Who is the author? Quote Link to comment Share on other sites More sharing options...
lucas3 Posted December 26, 2013 Author Share Posted December 26, 2013 I don't think he has any code. I also think the OP is using CADTutor to answer questions at a bulletin board that he is involved with (i.e. - he's asking on behalf of other people). Helping others can make yourself happy,Autolisp Not I'm good at, But I humbly ask! Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted December 26, 2013 Share Posted December 26, 2013 I also think the OP is using CADTutor to answer questions at a bulletin board that he is involved with (i.e. - he's asking on behalf of other people). Unfortunately, I think you are right ReMark: http://bbs.mjtd.com/thread-99808-1-1.html As for the author, it would appear that this header has been removed: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; ;;; ShangHai zhiren Mould Industry Co. Ltd. ;;; ;;; xiangzanyang (aug,2012) ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Quote Link to comment Share on other sites More sharing options...
ReMark Posted December 26, 2013 Share Posted December 26, 2013 I wonder who the OP is really trying to help here? lucas: Are you interested in learning to write your own lisp programs? Quote Link to comment Share on other sites More sharing options...
lucas3 Posted December 26, 2013 Author Share Posted December 26, 2013 Unfortunately, I think you are right ReMark: http://bbs.mjtd.com/thread-99808-1-1.html As for the author, it would appear that this header has been removed: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; ;;; ShangHai zhiren Mould Industry Co. Ltd. ;;; ;;; xiangzanyang (aug,2012) ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Lee,you are right !I deleted the redundant content is for A better view ,Original code have some Chinese, May cause garbled,so I edited! Quote Link to comment Share on other sites More sharing options...
lucas3 Posted December 26, 2013 Author Share Posted December 26, 2013 I wonder who the OP is really trying to help here? lucas: Are you interested in learning to write your own lisp programs? Of course I wanted to learn Quote Link to comment Share on other sites More sharing options...
lucas3 Posted December 26, 2013 Author Share Posted December 26, 2013 First of all, See someone else's program,Not perfect,Want to change,Didn't ability! so Ask for help Quote Link to comment Share on other sites More sharing options...
lucas3 Posted December 26, 2013 Author Share Posted December 26, 2013 Maybe I asked too many questions Quote Link to comment Share on other sites More sharing options...
ReMark Posted December 26, 2013 Share Posted December 26, 2013 Not necessarily. It might just be that there aren't a lot of forum members around today since yesterday was a holiday for most and some people extend it by a few days. Maybe they are sleeping late today. Quote Link to comment Share on other sites More sharing options...
lucas3 Posted December 26, 2013 Author Share Posted December 26, 2013 Not necessarily. It might just be that there aren't a lot of forum members around today since yesterday was a holiday for most and some people extend it by a few days. Maybe they are sleeping late today. That code BY向赞扬 ,not support Pline and not beautiful,I need QLEADER Quote Link to comment Share on other sites More sharing options...
ReMark Posted December 26, 2013 Share Posted December 26, 2013 I have not had an opportunity to test the code you posted. Quote Link to comment Share on other sites More sharing options...
lucas3 Posted December 26, 2013 Author Share Posted December 26, 2013 I have not had an opportunity to test the code you posted. The effect after operation are as follows Quote Link to comment Share on other sites More sharing options...
ReMark Posted December 26, 2013 Share Posted December 26, 2013 So you want a leader with an arrowhead and you want the arrowhead to start at the midpoint of the chamfer and not at one end or the other. Is that correct? Quote Link to comment Share on other sites More sharing options...
lucas3 Posted December 26, 2013 Author Share Posted December 26, 2013 So you want a leader with an arrowhead and you want the arrowhead to start at the midpoint of the chamfer and not at one end or the other. Is that correct? YES, like autodesk inventor Quote Link to comment Share on other sites More sharing options...
ReMark Posted December 26, 2013 Share Posted December 26, 2013 If you say so. I have no experience using Inventor. 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.