catoscuro Posted March 24, 2022 Posted March 24, 2022 HELLO, I HAVE A DYNAMIC BLOCK THAT PLACES A CERTAIN NUMBER OF CIRCLES (RODS) BETWEEN THE EXTREME CIRCLES, THE DISTANCE BETWEEN THE EXTREME CIRCLES MAY BE VARIABLE, YOU CAN ALSO VARY THE DIAMETER OF THE CIRCLES, I WANTED TO REPLICATE THE BLOCK, BUT I CAN'T , SOMEONE WOULD BE SO KIND TO EXPLAIN TO ME THE STEP BY STEP OF THE APPLICATION OF THE ACTIONS, THANK YOU Bar LLENOEPAPAQUI_LOOKUP.dwg Quote
catoscuro Posted March 24, 2022 Author Posted March 24, 2022 no, although it would be interesting if it could, I didn't know where to put this topic. My question with this block is how to do the stretch along with the scale action. Quote
SLW210 Posted March 24, 2022 Posted March 24, 2022 I have moved your thread to the AutoCAD Drawing Management & Output Forum. You posted in the LISP Forum. Quote
BIGAL Posted March 25, 2022 Posted March 25, 2022 The dwg is filled circles , as suggested very easy as a lisp, start, end points, rad required, how many all done. But would be individual objects probably a block. A circle 1 unit dia, solid fill. Quote
catoscuro Posted March 25, 2022 Author Posted March 25, 2022 Bigal, if it is possible you could make the lisp, I still haven't learned the program, I hope to start soon. regards Quote
BIGAL Posted March 27, 2022 Posted March 27, 2022 (edited) Try this, you need multi getvals.lsp so save in a support path directory. Or change the Load to include its location. I made a block from your left circle/hatch called Circhat. ; https://www.cadtutor.net/forum/topic/74671-gutting-dynamic-block-of-rods/ ; ; Circles between 2 pts. BY AlanH March 2022 (defun c:circ2pts ( / ans rad pt1 pt2 dist len lenspc num) (if (not AH:getvalsm)(load "Multi Getvals.lsp")) (setq ans (AH:getvalsm (list "Enter values " "Radius " 5 4 "1" "No." 5 4 "5"))) (setq rad (atof (car ans)) num (atoi (cadr ans))) (setq pt1 (getpoint "\nPick 1st point ") pt2 (getpoint pt1 "\nPick 2nd point ")) (setq dist (distance pt1 pt2) ang (angle pt1 pt2)) (command "-insert" "circhat" pt1 rad rad 0) (setq lenspc 0.0 len (/ dist (+ num 1))) (repeat (+ num 1) (setq lenspc (+ lenspc len)) (command "-insert" "circhat" (polar pt1 ang lenspc) rad rad 0) ) (princ) ) (c:circ2pts) Multi GETVALS.lsp Edited March 29, 2022 by BIGAL Quote
catoscuro Posted March 28, 2022 Author Posted March 28, 2022 Bigal. thank you very much for your time and effort, when executing the routine I get the following error, "Command: (LOAD "C:/LISP/BY DATE/March 2022/rods/circ2pts.lsp") (1 4) Pick 1st point Pick 2nd point 0 ; error: bad argument type: fixnum: 5.0 Could you tell me what could be wrong, thanks again. Quote
BIGAL Posted March 29, 2022 Posted March 29, 2022 1 I made 1 tiny mistake the num needed to be atoi changed code above. I may have changed during testing and not saved. 2 the multi getvals is loading the way the code expects it to be in a support path, or save it to C:/lisp then its available to any program you want to use it with. Edit code. (if (not AH:getvalsm) (load "C:\\LISP\\multi radio buttons.lsp")) There is Multi getvals.lsp, Multi Radio buttons col2.lsp & Multi toggles.lsp all library routines so it doesn't need to live in each user code. Quote
catoscuro Posted March 30, 2022 Author Posted March 30, 2022 I thank you, it will be very useful, I owe you a beer. 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.