danyra Posted January 3, 2020 Share Posted January 3, 2020 I have this points with his line: (setq l1 (getreal "\nLongitud de Apoyo:")) (setq p1 (getpoint "\nPunto Inicial:")) (setq p2 (polar p1 0 l1)) (entmakex (list '(0 . "line") (cons 10 p1) (cons 11 p2) '(62 . 2))) How can I make dimensions of this? Thanks for help to much, Im a begginer and I dont know enought. Quote Link to comment Share on other sites More sharing options...
marko_ribar Posted January 3, 2020 Share Posted January 3, 2020 Quote Link to comment Share on other sites More sharing options...
danyra Posted January 3, 2020 Author Share Posted January 3, 2020 1 hour ago, marko_ribar said: I did this question, they didnt give me the correct answer Quote Link to comment Share on other sites More sharing options...
danyra Posted January 3, 2020 Author Share Posted January 3, 2020 @Lee Mac please help me Quote Link to comment Share on other sites More sharing options...
BIGAL Posted January 4, 2020 Share Posted January 4, 2020 Have a look at this. Its a box but same idea. box.lsp Quote Link to comment Share on other sites More sharing options...
hanhphuc Posted January 4, 2020 Share Posted January 4, 2020 (edited) why not just enable polarmode or orthomode? coding is superfluous? (defun c:tt ( / p1 x) (and (setq p1 (getpoint "\nPunto inicial: ")) (setq x (getdist p1 "\nLongitud de Apoyo: ")) (vl-cmdf "_DIMLINEAR" "_non" p1 "_non" (polar p1 0 x) (mapcar '+ p1 (list 0 (* x -0.5 )) ) ) ) (princ) ) Edited January 4, 2020 by hanhphuc "_non" 1 Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted January 4, 2020 Share Posted January 4, 2020 10 hours ago, hanhphuc said: Coding is superfluous? (defun c:tt ( / p1 x) (and (setq p1 (getpoint "\nPunto inicial: ")) (setq x (getdist p1 "\nLongitud de Apoyo: ")) (vl-cmdf "_DIMLINEAR" "_non" p1 "_non" (polar p1 0 x) (mapcar '+ p1 (list 0 (* x -0.5 )) ) ) ) (princ) ) Looks similar to the solution previously provided. 1 Quote Link to comment Share on other sites More sharing options...
hanhphuc Posted January 5, 2020 Share Posted January 5, 2020 8 hours ago, Lee Mac said: Looks similar to the solution previously provided. thanks @Lee Mac i notice same link as @marko_ribar provided it was confusing OP has multiple posts, should have replied at that thread or here? initially i was thinking OP's 0.5 =(dist x 0.5) like this (defun foo ( p1 p2 / ) (entmakex (vl-list* '(0 . "DIMENSION") '(100 . "AcDbEntity") '(100 . "AcDbDimension") '(70 . 32) (mapcar 'cons '(13 14 10)(list p1 p2 (mapcar '+ p1 (list 0.0 (* (distance p1 p2) -0.5)) ) ) ) ) ) ) but OP repeats here asking this input (setq l1 (getreal "\nLongitud de Apoyo : " )) (setq p2 (polar p1 0 l1)) so i was just following same idea polar & getdist/getreal which ignore his entmakex line (confusing!) though i'm not very used to (command ... ) in code, never thought it accepts list like this (list ln p1) ! (command "_.dimlinear" "" (list ln p1) "_non" (mapcar '+ p1 '(0 -0.5 0))) p/s: moderator: merge? Quote Link to comment Share on other sites More sharing options...
danyra Posted January 6, 2020 Author Share Posted January 6, 2020 thanks @Lee Mac @hanhphuc @BIGAL @marko_ribar. I finally did it 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.