Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/29/2023 in all areas

  1. A co-worker showed me this trick. Select a batch of text objects that you want to turn into mtext. Important: unselect them by pressing Esc. Pull up the text2mtext command from the Express menu. You'll get a prompt that includes the SEttings option; type SE. Uncheck the box for "Combine into a single mtext object" (I had never seen this before). Back at the command prompt, type P to select the Previous selection set. Press Enter and Ta-Da! all those single text items are single mtext items. You can give them frames or background masks or whatever.
    2 points
  2. You can try this... You give the starting point. Then with dexterity you pass the cursor over the existing path of the polyline and/or another polyline touching the first one (in the direction you want) without any click. As you progress, a virtual segment (in red) will emerge... When the last segment is drawn, you validate with a right-click (defun round (num prec) (if (zerop (setq prec (abs prec))) num (* prec (fix ((if (minusp num) - +) (/ num prec) 0.5))) ) ) (defun c:cpoly_on_poly ( / p1 p2 key pt_sel ss ent obj_lw param_pt new_param pt lst_pt lst_gr) (initget 1) (setq p1 (getpoint "\nStart point: ") new_param nil ent nil lst_pt (list p1) lst_gr nil ) (while (and (setq key (grread T 4 0)) (not (member key '((2 13) (2 32)))) (/= (car key) 25)) (cond ((eq (car key) 5) (setq pt_sel (osnap (list (caadr key) (cadadr key)) "_near") ) (if pt_sel (progn (setq ss (ssget "_C" pt_sel pt_sel '((0 . "LWPOLYLINE")))) (if ss (setq ent (ssname ss 0))) ) ) (cond (ent (setq obj_lw (vlax-ename->vla-object ent) pt_sel (vlax-curve-getClosestPointTo obj_lw (trans (cadr key) 1 0)) ) (cond (pt_sel (setq param_pt (vlax-curve-getParamAtPoint obj_lw pt_sel) param_pt (round param_pt 1.0) ) (cond (new_param (setq pt (vlax-curve-getPointAtParam obj_lw param_pt)) (if (and (not (eq param_pt new_param)) (not (member pt lst_pt))) (progn (setq lst_pt (cons (trans pt 0 1) lst_pt)) (setq p2 (trans pt 0 1)) (setq lst_gr (append (cons 1 (list p1 p2)) lst_gr)) (grvecs lst_gr) (setq p1 p2) ) ) ) ) (setq new_param param_pt) ) ) ) ) ) ((member key '((2 117)(2 85))) (if lst_gr (setq lst_gr (cdddr lst_gr) lst_pt (cdr lst_pt) p1 (car lst_pt) ) ) (redraw) (grvecs lst_gr) ) (T (if lst_gr (grvecs lst_gr)) ) ) ) (redraw) (cond (lst_pt (setvar "CMDECHO" 0) (command "_.pline") (foreach n lst_pt (command "_none" n)) (command "") (setvar "CMDECHO" 1) (sssetfirst nil (ssadd (entlast))) ) ) (prin1) )
    1 point
  3. Thanks for sharing the cad-notes link and saving my time! However, I googled yesterday and this morning for any such tutorial and found nothing. I'm currently in Switzerland for work, so it's possible that Swiss google doesn't show US links. Thanks again!
    1 point
  4. @Radu Iordache There was one minor issue if you select more than one polylne then the outcome would mix up with the other polylines' data so I have revised the codes above accordingly.
    1 point
  5. I didn't know you needed continuation of vertices between polylines... I've mod. my version, you can test it - should work...
    1 point
×
×
  • Create New...