kalai Posted May 10, 2011 Share Posted May 10, 2011 i am not able to create radial dim. code: (command "circle" '(0 0 0) 100) (command "dimradius" (entlast) '(200 100 0)) i am not getting error but radial dim is not created. help me. Quote Link to comment Share on other sites More sharing options...
fixo Posted May 10, 2011 Share Posted May 10, 2011 How about: (vl-cmdf "_.circle" "_non" '(0 0 0) 100) (vl-cmdf "_.dimradius" (ssname (ssget "L") 0) '(200 100 0) ) Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted May 10, 2011 Share Posted May 10, 2011 I think perhaps: (command "_.circle" "_non" '(0. 0. 0.) 100.) (command "_.dimradius" (list (entlast) '(100. 0. 0.)) "_non" '(200. 100. 0.)) Quote Link to comment Share on other sites More sharing options...
kalai Posted May 10, 2011 Author Share Posted May 10, 2011 thanks it works, can u explain '(100. 0. 0.)?? i cant understand Quote Link to comment Share on other sites More sharing options...
fixo Posted May 10, 2011 Share Posted May 10, 2011 Mine code is working on my end with no problems as well (A2010/2009) Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted May 10, 2011 Share Posted May 10, 2011 Mine code is working on my end with no problems as well (A2010/2009) Sorry Fixo, yours works too @kalai: '(100. 0. 0.) is a point on the circle - I would suggest using Fixo's method though. Quote Link to comment Share on other sites More sharing options...
kalai Posted May 10, 2011 Author Share Posted May 10, 2011 sorry fixo, your code also works thank you but i have a collection of circles of varying radius to be dimensioned. how shall i proceed? Also i have change the text ht and arrow size? Quote Link to comment Share on other sites More sharing options...
fixo Posted May 10, 2011 Share Posted May 10, 2011 (edited) Glad if so You have to create selection set something like: (setq sset (ssget (list (cons 0 "circle")))) then loop through selected items usual way (while (setq en (ssname sset 0)) (setq elist (entget en) center (cdr (assoc 10 elist)) rad (cdr (assoc 10 elist) pt (polar center 0 rad)) (vl-cmdf "_.dimradius" (ssname (ssget "pt) 0) pt ) (ssdel en sset) );end while Cheers Edited May 10, 2011 by fixo code added Quote Link to comment Share on other sites More sharing options...
kalai Posted May 10, 2011 Author Share Posted May 10, 2011 fixo, but i have a collection of circles of varying radius to be dimensioned. how shall i proceed? Also i have change the text ht and arrow size? Quote Link to comment Share on other sites More sharing options...
kalai Posted May 10, 2011 Author Share Posted May 10, 2011 FIXO , iam getting error at this point, (vl-cmdf "_.dimradius" (ssname (ssget "pt) 0) pt ) pls check, Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted May 10, 2011 Share Posted May 10, 2011 Maybe use: (defun c:test ( / ss i e p r ) (if (setq ss (ssget '((0 . "CIRCLE")))) (repeat (setq i (sslength ss)) (setq e (ssname ss (setq i (1- i))) p (cdr (assoc 10 (entget e))) r (cdr (assoc 40 (entget e))) ) (vl-cmdf "_.dimradius" (list e (polar p 0 r)) "_non" (polar p 0 r)) ) ) (princ) ) Quote Link to comment Share on other sites More sharing options...
fixo Posted May 10, 2011 Share Posted May 10, 2011 FIXO , iam getting error at this point, (vl-cmdf "_.dimradius" (ssname (ssget "pt) 0) pt ) pls check, Sorry I wrote it without editor Try instead (defun C:mdrad(/ cp elist en pt rad sset) (if (setq sset (ssget '((0 . "circle")))) (while (setq en (ssname sset 0)) (setq elist (entget en) cp (cdr (assoc 10 elist)) rad (cdr (assoc 40 elist)) pt (trans (polar cp (/ pi 4) rad) 1 0)) (vl-cmdf "_.dimradius" (ssname (ssget pt '((0 . "circle"))) 0) pt ) (ssdel en sset) ) ) (princ) ) Quote Link to comment Share on other sites More sharing options...
ricardo matos Posted May 28, 2017 Share Posted May 28, 2017 pls, can you explain why "_non" and whay '(200. 100. 0.)) i cant understand Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted May 28, 2017 Share Posted May 28, 2017 See this tutorial: http://lee-mac.com/scriptwriting.html Quote Link to comment Share on other sites More sharing options...
ricardo matos Posted May 29, 2017 Share Posted May 29, 2017 lee mec tks. and now '(200 100 0)? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted May 29, 2017 Share Posted May 29, 2017 '(200 100 0) is a literal list representing the 3D coordinate (200, 100, 0). Quote Link to comment Share on other sites More sharing options...
ricardo matos Posted May 30, 2017 Share Posted May 30, 2017 now understand. tks Lee Mac Quote Link to comment Share on other sites More sharing options...
ricardo matos Posted May 30, 2017 Share Posted May 30, 2017 Now l want creat a lisp using DIMARC with just points.l not want click in arc, l want click just in points. Lee Mac can you help me again? Quote Link to comment Share on other sites More sharing options...
ricardo matos Posted June 1, 2017 Share Posted June 1, 2017 if l have (setq list_1(assoc 8 "red")) l can subst (setq list_1(entmod(subst(cons 8 "green")(assoc 8 list_1)list_1))) but, how can l subst (10 6433.43 9440.89 0) (10 0 0 0) ????? 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.