Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/13/2025 in all areas

  1. You might want to check out OpenDCL, it has pallets, block preview … all the tools you would need create a block + group manager
    1 point
  2. You want to create a GUI? There’s a sample in python creating a palette with block names and preview https://github.com/CEXT-Dan/PyRx?tab=readme-ov-file#features you’d have to roll it yourself. There’s also opendcl if you feel more comfortable with lisp
    1 point
  3. Monday i Will test It and i tell you .thanks a lot
    1 point
  4. ClipIt (Express Tool) works on blocks, etc. so I got it to work manually. I did do some light reading on automating options in a called Express Tool, so maybe at some point. This works for me, hopefully speeds things up for the OP. Works OP provided .dwg and some quick blocks to test it. ;;; Creates a circular detail clip from a block reference. Copies, scales, and trims to scaled circle (connected by trimmed line). ;;; ;;; https://www.cadtutor.net/forum/topic/98334-detail-circle-in-ms/page/2/#findComment-674313 ;;; ;;;*************************************************************************************************| ;;; | ;;; By SLW210 (a.k.a. Steve Wilson) | ;;; | ;;; MSCirClip.lsp | ;;; | ;;; Uses the Express Tool ClipIt manually (maybe this will be automated at a later time). | ;;; At the prompt-Select the detail circle then select the copied and scaled block. | ;;; At Enter maximum allowable error distance for resolution of arc segments. | ;;; I used 1 and it seems good (smaller is more segments) (see Clipit in Express Tools help). | ;;; | ;;;*************************************************************************************************| ;;; ClipIt creates a pseudo circle of polylines, the connector line will most likely have a gap. | ;;; | ;;; Optionally you could comment the part erasing it. | ;;; | ;;;*************************************************************************************************| ;;; (defun c:MSCIRCLIP (/ ent cen rad circle newPt scaleFactor newRad vec dir pt1 pt2 len scaledBlock detailCircle entsBefore entsAfter diffBlocks ) (vl-load-com) (prompt "\n--- MODELSPACE DETAIL VIEW WITH CLIPIT ---\n") ;; Modelspace entities (defun all-ents () (vl-remove-if 'null (mapcar 'cadr (ssnamex (ssget "_X" '((410 . "Model"))))) ) ) ;; Select block reference (setq ent (car (entsel "\nSelect block reference to detail: "))) (if (not (and ent (= (cdr (assoc 0 (entget ent))) "INSERT"))) (progn (prompt "\nNot a valid block reference.") (exit)) ) ;; Circle center/radius (setq cen (getpoint "\nSpecify center of detail circle: ")) (setq rad (getdist cen "\nSpecify radius of detail circle: ")) (entmakex (list '(0 . "CIRCLE") (cons 10 cen) (cons 40 rad) (cons 62 1) (cons 8 "DETAIL") ) ) ;; Detail location and scale (setq newPt (getpoint "\nSpecify center point for detail view: ")) (initget 7) (setq scaleFactor (getreal "\nEnter detail scale factor (e.g. 2): ")) (setq newRad (* rad scaleFactor)) ;; Copy and scale block (command "COPY" ent "" cen newPt) (setq scaledBlock (entlast)) (command "SCALE" scaledBlock "" newPt scaleFactor) ;; Clipping circle (setq detailCircle (entmakex (list '(0 . "CIRCLE") (cons 10 newPt) (cons 40 newRad) (cons 62 1) (cons 8 "DETAIL") ) ) ) ;; Run CLIPIT manually (prompt "\n>>> Run CLIPIT: Select the detail circle and the new (scaled) block.\n" ) (C:CLIPIT) ;; Delete temp circle after CLIPIT (if (and detailCircle (entget detailCircle)) (entdel detailCircle) ) ;; Draw connector line (setq vec (mapcar '- newPt cen)) (setq len (distance cen newPt)) (setq dir (mapcar '/ vec (list len len len))) (setq pt1 (mapcar '+ cen (mapcar '* dir (list rad rad rad)))) (setq pt2 (mapcar '- newPt (mapcar '* dir (list newRad newRad newRad)) ) ) (entmakex (list '(0 . "LINE") (cons 10 pt1) (cons 11 pt2) (cons 62 3) (cons 8 "DETAIL") ) ) (prompt "\nDetail view created and connector drawn.\n") (princ) )
    1 point
×
×
  • Create New...