Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/04/2022 in all areas

  1. The problem @BIGAL is that one block is 10-20 small lines that don't touch making them look like one long dashed line. That code you posted is basically what I posted but cleaner. If all block's are to representing a line. I guess you could explode one at a time. add all those little lines into a selection set. then get all the start and end points of each line add them into a list. process the list to find the longest distance (kinda know how to do this part but not really) and use those two end points to generate a long line add that to a third selection set. Delete all the little lines. repeat join all long lines that where created. --Edit Just had to write out the steps. *This will only work if blocks are like example (defun c:foo (/ SSblk SS LastEnt SSline) (setq SSline (ssadd)) (if (setq SS (ssget "_:L" '((0 . "INSERT")))) (foreach blk (vl-remove-if 'listp (mapcar 'cadr (ssnamex SS))) (setq SSblk (ssadd)) (setq LastEnt (entlast)) (vl-cmdf "_.Explode" blk) (while (setq LastEnt (entnext LastEnt)) (ssadd LastEnt SSblk) ) (foreach ent (vl-remove-if 'listp (mapcar 'cadr (ssnamex SSblk))) (setq ptlst (cons (cdr (assoc 10 (setq line (entget ent)))) ptlst)) (setq ptlst (cons (cdr (assoc 11 line)) ptlst)) (entdel ent) ) (vl-sort ptlst '(lambda (a b) ;probably need a better sort like chekcing distance but this works (if (equal (car a) (car b) 1e-6) (< (car a) (car b)) (< (cadr a) (cadr b)) ) ) ) ;after sort first and last point should be the greast distance (entmake (list '(0 . "LINE") (cons 10 (car ptlst)) (cons 11 (last ptlst)) '(62 . 1))) (ssadd (entlast) SSline) (setq ptlst nil ssBlk nil ) ) (prompt "\nNothing selected") ) (if SSline (vl-cmdf "_.join" SSline "") ) (princ) )
    1 point
  2. Here we go again. You need to enable the QUADrant Osnap. All this information is readily available at your fingertips if only you would 1) make the effort and 2) use AutoCAD Help. Press <Shift> and right-click in the drawing area, then choose an object snap mode from the Object Snap menu that appears. Right-click OSNAP on the status bar, and then click Object Snap Settings…
    1 point
  3. As ReMark mentioned, you need to be in a 3D View. Looking at the screenshot you posted, you're in a 2D Front view. The 3DROTATE command will not work in a 2D view.
    1 point
  4. As ReMark mentioned, the command is 3DROTATE, which I already told you about in another thread. You need to start taking notes. When we answer your questions, write it down in a notebook so you can refer back to it. That way you won't have to keep asking the same questions and you won't get confused about what commands to use in which program. I have moved this question to the 3D Modeling and Rendering section. https://www.cadtutor.net/forum/forum/14-autocad-3d-modelling-amp-rendering/
    1 point
  5. You have been told, a couple of times now, to post your questions in the proper forum. This forum is for basic AutoCAD questions. There is a forum specific to working in 3D: AutoCAD 3D Modelling and Rendering. The GTAUTO system variable sets whether gizmos are displayed automatically whenever you select objects in a 3D view that is set to a 3D visual style (default). If you turn off this system variable, the grips are not displayed until the gizmos are active. When you start the 3D Move, 3D Rotate, or 3D Scale operation before selecting objects, the gizmo is placed at the center of the selection set. Use the Relocate Gizmo option on the shortcut menu to relocate the gizmo anywhere in 3D space. You can also choose a different type of gizmo on the shortcut menu.
    1 point
  6. here is my take You can select multiple text to copy. It will filter out duplicates. Then sort them in an order (works best with numbers) and then ask what text to update with what its going to update to. right click to go to the next in the list. Example ;;----------------------------------------------------------------------------;; ;; Select Multiple Text Update Multiple Text (defun C:UMT (/ SS lst txt ent) (if (setq SS (ssget '((0 . "TEXT")))) (foreach txt (vl-remove-if 'listp (mapcar 'cadr (ssnamex SS))) (setq str (cdr (assoc 1 (entget txt)))) (if (not (member str lst)) (setq lst (cons str lst)) ) ) ) (setq lst (vl-sort lst '<)) (while (> (length lst) 0) (if (and (setq txt (car (entsel (strcat "\nUpdate Text To: [" (car lst) "]")))) (eq (cdr (assoc 0 (setq x (entget txt)))) "TEXT")) (progn (entmod (subst (cons 1 (car lst)) (assoc 1 x) x)) ;(setq lst (cdr lst)) ;uncomment if you only want to go to the next item on the list if successful, no multiple selections like #1 example. ) (setq lst (cdr lst)) ) ) (princ) )
    1 point
  7. Reverse order try with this line removed. (setq lst (reverse lst)) Have to go now so code not tested more.
    1 point
×
×
  • Create New...