Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/13/2020 in all areas

  1. @CADTutor Yup, that looks better, Thanks David.
    1 point
  2. hi, take a look here BTW, just curious.. (assoc 1 entget_circle1) ??? circle textstring ?? @ojacomarket i prefer assoc list but in your case (cond (bla)( bla)), suggest foreach but your wild card pattern is too common like: " a*" " b*" " r*", you may get multiple result!! Try this simple test, just key-in any word, it princ out LT&Layer if wmatch condition met note: please check if any typos in list ?? it was just quick clipboard edit (defun c:test (/ lst str) (setq lst '((" h*" "HOONEKP" "HOONE") (" hdet*" "HOONEKP" "HOONEDET") (" a*" "ASFBET" "TEE") (" b*" "ASFBET" "TEE") (" kill*" "KRUUSKILL" "TEE") (" ak*" "AAREKIVI" "TEE") (" kt*" "TEERADA" "TEE") (" pt*" "PINNASTEE" "TEE") (" paed*" "LA_AED" "AED") (" aedvund*" "AIAVUND" "AED") (" vaed*" "VO_AED" "AED") (" maed*" "RAKAED" "AED") (" kaed*" "KIVIAED" "AED") (" myyr*" "MYYR" "AED") (" r*" "RAJATISP" "RAJATIS") (" kolv*" "KOLVIK" "HALJASTUS") (" hek*" "HEKK" "AED") (" tm*" "KOLVIK" "RELJEEF") (" np*" "NOLVAPEAL" "RELJEEF") (" na*" "NOLVAALL" "RELJEEF") (" kraav*" "KRAAVIPERV" "VEEKOGU") ) ) (while (and (setq str (getstring t "\nInput text : ")) (/= str "")) (foreach x lst (if (wcmatch (strcat " " str) (car x)) ;;; (entmake (list (cons 0 "LINE") ;;; (cons 6 (cadr x)) ;;; (cons 8 (caddr x)) ;;; (cons 10 circle_NEW_coords_1) ;;; (cons 11 circle_NEW_coords_2) ;;; ) ;;; ) (princ (strcat "\n" (vl-princ-to-string (cdr x)))) ) ) (princ) ) )
    1 point
  3. Wow got dizzy with that code an easy way is as you make a circle add the center points to a list. Then draw a single poly line this is the way I normally approach a task like this. If you want to see the poly as you add a circle you will need to make 1st circle out side of while. Then can make 1st pline section. Then add a line as you add a circle lastpt -> newpt then use pedit Join (entlast) so will see it happening. For make 1 pline ; create pline from a list of points ; By Alan H March 2019 (defun AHpllst ( lst / x) (command "_pline") (while (= (getvar "cmdactive") 1 ) (repeat (setq x (length lst)) (command (nth (setq x (- x 1)) lst)) ) (command "") ; for close (command "c") ) ) ; (ahpllst (list '(0 0) '(10 10) '(35 6))) (defun ahaddlstpts ( / ) (setq lst '()) (while (setq pt (getpoint "\nPick point enter to exit")) (setq lst (cons pt lst)) ) ) ; (ahpllst lst) There is another post recently about joining circles only like a week old may be usefull to look at.
    1 point
  4. If you're interested. https://www.autodesk.com/genuine/report-piracy
    1 point
×
×
  • Create New...