Jump to content

All Activity

This stream auto-updates

  1. Past hour
  2. SLW210

    Align points

    ptsalign should do it.
  3. Today
  4. This is a fairly common Paper Space / viewport issue rather than a problem with your model. What you’re seeing is facet aliasing caused by how AutoCAD displays and plots shaded viewports, especially when using the BASE command. Model Space looks fine because it’s using higher real-time display resolution; Paper Space viewports are rasterized differently. Here are the things that usually fix it: 1. Increase viewport display resolution AutoCAD uses a lower tessellation for shaded viewports by default. In Model Space, type: FACETRES Set it to: 10 (Valid range is 0.01–10, higher = smoother curved/diagonal edges) Then REGENALL. 2. Check VIEWRES Still in Model Space: VIEWRES Answer Yes to fast zooms Set it to something like: 2000 This affects how smooth diagonal edges appear when displayed. 3. Viewport Visual Style In Paper Space, select the viewport and confirm: Visual Style = Shaded or Shaded with Edges Not Conceptual or Realistic (those can exaggerate faceting) You can also try: SHADEDGE Set to: 3 (Smooth edges without heavy outlines) 4. Plot settings (very important) When plotting to PDF: Plotter: DWG To PDF.pc3 In Properties → Graphics: Set Vector Resolution to 1200 dpi Set Raster Image Quality to High Make sure Plot transparency is ON (even if you’re not using transparency) Low raster resolution is a major cause of jagged diagonal shading. 5. BASE command note The BASE command creates a Paper Space representation that behaves like a shaded viewport. It’s more sensitive to resolution than raw Model Space views. Increasing FACETRES and plot resolution almost always fixes this. 6. Quick test As a sanity check: Create a normal viewport (not BASE) Set it to the same view and visual style Plot it If the jagged edges disappear, the issue is 100% display/plot resolution related, not geometry.
  5. this lisp is fine, but instead of picking each point, can we write a lisp routine to select multiple points and write dimension automatically. Sample File uploaded above.
  6. this lisp is fine, but instead of picking each point, can we write a lisp routine to select multiple points and write dimension automatically.
  7. AutoDimensioning-VV.dwg
  8. hardwell3458

    Smart offset lisp

    I've included another video as an example. smart offset.mp4
  9. hardwell3458

    Smart offset lisp

    Thank you for your answers. The Lisp code you described might be useful, but as you said, when traversing areas like walls or columns, it offsets the line by 6 units, and if there's a pre-drawn, offset line, it follows it all the way to the end. Could you share your code? @BÜYÜK
  10. Yesterday
  11. BIGAL

    Smart offset lisp

    I did something for water pipes or electric cables in a road, it just allows you to follow line segments, with a predefined offset. I am not sure though in your last bit of Video if you want to enter the length of the last leg, can you clarify that. The code I have draws a full last length. @ScottMC not sure that overall length is required. Just a ps did you mean to post the actual code as you have the lisp file to download.
  12. ScottMC

    Smart offset lisp

    Here's a useful Lee.Mac Power.tool TotalLengthPolylineV1-0.lsp
  13. hardwell3458

    Smart offset lisp

    Hi, I need a smart and dynamic offset Lisp when drawing electrical projects. polyline will follow the wall. Like in the video. ScreenRecording_01-20-2026 22-20-40_1.mov
  14. @Kumar1 please upload a sample.dwg with, at least, 2 o3 dim as you need it to be
  15. Saxlle

    Minus value to set zero

    Very nice @CyberAngel, like it!
  16. CyberAngel

    Minus value to set zero

    Why get fancy? (max 0 (- botLength 6000))
  17. I've had this problem for a long time. To apply justification to text in a multitext, you have to select it. Even if the justification applies to the entire contents. That doesn't match what happens in word processors, but whatevs.
  18. гена

    Align points

    а как запустить команду?
  19. auto dimensioning by selecting multiple points and one line object
  20. marko_ribar

    Minus value to set zero

    (if (minusp (- botLength 6000)) (setq botLength 6000) )
  21. Saxlle

    Minus value to set zero

    Just another example, nice, also it would work.
  22. Steven P

    Minus value to set zero

    If (- botLength 6000) is minus.... (if (= (minusp (- botlength 6000)) T) ;; verifies that a number is negative (setq botLength 0) ;; if it is, it will set to 0 (setq botLength (- botLength 6000)) ;; if it isn't, it will be substracted with "6000" ) ;;End If
  23. Saxlle

    Minus value to set zero

    (if (= (minusp botLength) T) ;; verifies that a number is negative (setq botLength 0) ;; if it is, it will set to 0 (setq botLength (- botLength 6000)) ;; if it isn't, it will be substracted with "6000" )
  24. dexus

    Minus value to set zero

    You mean like this? (if (minusp botLength) 0 (- botLength 6000))
  25. (- botLength 6000) If this value is a minus value , I need to set it zero. Please help
  26. Last week
  27. @xenru Please upload your-sample-dwg
  28. @SCHNIPPLES please give it a try ;;----------------------------------------------------------------------;; ;; Design and modify by Gabo CALOS DE VIT from CORDOBA ARGENTINA ;;; Copyleft 1995-2026 by Gabriel Calos De Vit ; DEVITG@GMAIL.COM ;Hecho y modificado por Gabo CALOS DE VIT de CORDOBA ARGENTINA ;;; Copyleft 1995-2026 por Gabriel Calos De Vit ;; DEVITG@GMAIL.COM ;;; inicio-defun-20-ene-2026 ;; as per ;;https://www.cadtutor.net/forum/topic/98950-create-perpendicular-dimension-between-two-parallel-polylines/ ;;*------------------------------------------------------------------------------------------- (defun c:T5 (/ ACAD-OBJ acExtendNone ADOC AT&T-STYLE BASE-OBJ BASEENT CE CP1 DERIV DIM-STYLES DIM-TXT-PT DIMOBJ INTS-VAR@BASE INTS-VAR@TGT INTS@BASE INTS@TGT MODEL NRM OS P P1 P2 PARAM S SEARCHRAD SMPL-DIM SMPL-DIM-LAY SMPL-DIM-STYLE SMPL-OBJ TAN TGT-OBJ TGTENT TMP-OBJ TMPE X ) ;_ end of / (VL-LOAD-COM) (SETQ ACAD-OBJ (VLAX-GET-ACAD-OBJECT)) ;_ el programa ACAD (SETQ ADOC (VLA-GET-ACTIVEDOCUMENT ACAD-OBJ)) ;_ el DWG que esta abierto- (SETQ MODEL (VLA-GET-MODELSPACE ADOC)) (setq dim-styles (VLA-GET-DIMSTYLES adoc)) (setq searchRad 2000.0) ; increase if your gaps are big (drawing units) (defun v+ (a b) (mapcar '+ a b)) (defun v- (a b) (mapcar '- a b)) (defun v* (v s) (mapcar '(lambda (x) (* x s)) v)) (defun dot (a b) (+ (* (car a) (car b)) (* (cadr a) (cadr b)) (* (caddr a) (caddr b)) ) ;_ end of + ) ;_ end of defun (defun len (v) (sqrt (dot v v))) (defun unit (v / L) (setq L (len v)) (if (> L 1e-12) (v* v (/ 1.0 L)) v ) ;_ end of if ) ;_ end of defun (defun dist (a b) (len (v- a b))) (setq os (getvar "OSMODE")) (setq ce (getvar "CMDECHO")) (setvar "OSMODE" 0) (setvar "CMDECHO" 0) (alert "\n you have to select a dim you had done ") (princ "\n Select a sample dim") (setq smpl-dim (ssname (ssget "_:S+." '((0 . "dimension"))) 0)) (setq baseEnt (car (entsel "\nSelect BASE object (ROW): "))) (redraw baseEnt 3) (setq base-obj (vlax-ename->vla-object baseEnt)) (setq tgtEnt (car (entsel "\nSelect TARGET object (BOC/Fiber/etc.): "))) (redraw tgtEnt 3) (setq tgt-obj (vlax-ename->vla-object tgtEnt)) (setq p (getpoint "\nPick dimension location (also picks the side): " ) ;_ end of getpoint ) ;_ end of setq (if (and baseEnt tgtEnt p) (progn ;; Closest point on base (setq cp1 (vlax-curve-getClosestPointTo baseEnt p)) ;; Tangent derivative at cp1 (setq param (vlax-curve-getParamAtPoint baseEnt cp1)) (setq deriv (vlax-curve-getFirstDeriv baseEnt param)) (setq tan (unit deriv)) ;; Normal (perpendicular) in XY (setq nrm (unit (list (- (cadr tan)) (car tan) 0.0))) ;; Build long perpendicular segment through cp1 (setq p1 (v- cp1 (v* nrm searchRad))) ;(setq point@p1 (VLA-ADDPOINT model (VLAX-3D-POINT p1))) (setq p2 (v+ cp1 (v* nrm searchRad))) ;(setq point@p2 (VLA-ADDPOINT model (VLAX-3D-POINT p2))) ;; Create temp LINE entity (so we can intersect reliably) (setq tmpE (entmakex (list (cons 0 "LINE") (cons 10 p1) (cons 11 p2) ) ;_ end of list ) ;_ end of entmakex ) ;_ end of setq (setq tmp-obj (vlax-ename->vla-object (entlast))) ;; Get intersections between target and temp line ; You had an error here. it is not ;; (setq ints (vlax-curve-intersectwith tgtEnt tmpE acextendnone)) ;;it is so (setq ints-var@tgt (vla-intersectwith tgt-obj tmp-obj acextendnone)) (setq ints@tgt (VLAX-SAFEARRAY->LIST (VLAX-VARIANT-VALUE ints-var@tgt))) ;(setq point@tgt (VLA-ADDPOINT model ints-var)) ;; Get intersections between base and templine (setq ints-var@base (vla-intersectwith base-obj tmp-obj acextendnone)) (setq ints@base (VLAX-SAFEARRAY->LIST (VLAX-VARIANT-VALUE ints-var@base))) ;(setq point@base (VLA-ADDPOINT model ints-var@base)) (vla-delete tmp-obj) ;;(setq smpl-dim (ssname (ssget "_:S+." '((0 . "dimension"))) 0)) (setq smpl-dim-style (cdr (assoc 3 (entget smpl-dim)))) (setq smpl-obj (vlax-ename->vla-object smpl-dim)) (setq smpl-dim-lay (vla-get-layer smpl-obj)) (setvar 'clayer smpl-dim-lay) (setq at&t-style (vla-item dim-styles (VLA-GET-STYLENAME smpl-obj))) ;"AT&T" (vla-put-ActiveDimStyle adoc at&t-style) (setq dim-txt-pt (MAPCAR '* '(0.5 0.5 0.5) (MAPCAR '+ ints@base ints@tgt))) (setq dimObj (vla-AddDimAligned model ints-var@base ints-var@tgt (VLAX-3D-POINT dim-txt-pt) ) ;_ end of vla-AddDimAligned ) ;_ end of setq ) ;_ end of progn ) ;_ end of if (VL-CMDF "regen") (setvar "CMDECHO" ce) (setvar "OSMODE" os) (princ) ) ;_ end of defun ;|«Visual LISP© Format Options» (100 2 40 2 T "end of " 60 9 0 0 0 T T nil T) ;*** DO NOT add text below the comment! ***|; dim to lines SCHNIPPLES cadtutor.lsp
  1. Load more activity
×
×
  • Create New...