Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/16/2024 in all areas

  1. Your welcome to use this, just save Multi radio buttons.lsp to a support path. (if (not AH:Butts)(load "Multi radio buttons.lsp")) ; loads the program if not loaded already (setq Dbuitm (ah:butts 1 "V" '("Choose " "80" "90" "100" "110" "120" "130" "140" "150" "vrije-invoer"))) Multi radio buttons.lsp
    1 point
  2. For that simple example try this. Be aware that the new block names will be "P2B" rather than "P2B#" (defun c:foo (/ s) (cond ((null (tblobjname "block" "P2B")) (entmake '((0 . "BLOCK") (100 . "AcDbEntity") (67 . 0) (8 . "0") (100 . "AcDbBlockReference") (2 . "P2B") (10 0. 0. 0.) (70 . 0) ) ) (entmake '((0 . "LWPOLYLINE") (100 . "AcDbEntity") (67 . 0) (8 . "DC-PHU") (100 . "AcDbPolyline") (90 . 4) (70 . 1) (43 . 0.) (38 . 0.) (39 . 0.) (10 23.87326421258058 13.68140906092549) (10 -23.87326421258058 13.6814090609255) (10 -23.87326421258058 -13.68140906092547) (10 23.87326421258058 -13.68140906092549) ) ) (entmake '((0 . "ENDBLK") (100 . "AcDbBlockEnd") (8 . "0"))) ) ) (if (setq s (ssget ":L" '((0 . "INSERT") (2 . "P2B*")))) (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s))) (entmod (append (entget e) '((2 . "P2B")))) ) ) (princ) )
    1 point
  3. Consider taking the direct integer input rather than converting a string to a number. Here's a simple example: ;; List of values to use (setq l '(80 90 100 110 120 130 140 150)) (setq dbuitm1 (cond ;; If the user presses enter or the value does not exist in the list ((car (member (getint "\nDikte Buitenmuur [80/90/100/110/120/130/140/150]:<Enter for user input> " ) l ) ) ) ;; Then prompt for a user input value here ((getint "\nBreedte Buitenmuur in MM: ")) ) ) ;; Convert the numbers to strings and set your other variable to them ;; of course you have to make sure that 'dbuitm1 dspouw1 dbinm1' all exist (mapcar 'set '(dbuitm dspouw dbinm) (mapcar 'vl-princ-to-string (list dbuitm1 dspouw1 dbinm1)))
    1 point
  4. (setq Dspouw1 (itoa (getint "\nBreedte Spouw (mm) : "))) of (vl-princ-to-string (getint "..."))
    1 point
  5. @mdchuyen This lisp can replace all blocks with a horizontal one. But these blocks will have the same name as the horizontal block. replac.lsp
    1 point
  6. Disregard that I fiddled around with it and figured it out I appreciate all of yall's help! I am going to test out the other ones when I go in tonight i work night shift.
    1 point
  7. This allows you to select multiple objects at once and add them all up. ;;----------------------------------------------------------------------;; ;ADD UP TOTAL LENGHTS OF SELECTED OBJECTS. (defun c:TLEN (/ e ss len i) (setq len 0.0 ss (ssget '((0 . "LINE,SPLINE,LWPOLYLINE,POLYLINE,ARC,CIRCLE,ELLIPSE")))) (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss))) (setq len (+ len (vlax-curve-getDistAtParam e (vlax-curve-getEndParam e)))) ) (princ (strcat "\nTotal length = " (rtos len 2 3))) (vlax-invoke (vlax-get (vlax-get (vlax-create-object "htmlfile") 'ParentWindow) 'ClipBoardData) 'setData "TEXT" (rtos len 2 3)) ;above copys to clipboard (princ) ) Added the last line so it also copies it to the clipboard so when you edit your block all you have to do is Ctrl+V to paste the value. Total length = 231.311 Ctlr+V will past "231.311"
    1 point
  8. hello its been years since i visit the site, and hope you guys could help me. is there a lisp here that could create an wipeout between two object by clicking in between? say a circle inside a rectangle, creating a wipeout by simply clicking inside the rectangle and automatically creates a wipeout on the circle... im looking for a lisp for it to make a wipeout like sofas, chair, etc without going to trace the object. thank you in advance and Keep safe everyone.
    1 point
  9. As per PM If a spline explode then pedit and rejoin all the segments then do a wipeout use polyline keep outline.
    1 point
  10. Something like so: Drawing1.dwg
    1 point
  11. Then do something that mimics a wipeout ?
    1 point
  12. hatch sir? then???
    1 point
  13. 1 point
  14. thank you guys.... my apologies, but as per attached is what i want to achieve. cheers.
    1 point
  15. In the case of overlapping objects, if you bpoly the area then you can pull it apart and replace the arcs/bulge with short straights, some one a bit smarter than me may have something I only have the arch 2 chords part. You can pick the pline for the wipeout. ; converts an arc or circle to a series of straights ; By alan H 2012 ; info@alanh.com.au (vl-load-com) (defun C:arc2chords ( / ss ncrd oldsnap ent endpt obj totlen arclen chrdpt num newpt ang cenpt) (setq oldsnap (getvar "osmode")) (if (= ncrd nil) (setq ncrd (getint "\nEnter number of chords: "))) (setvar 'osmode 512) (while (setq pt (getpoint "Pick Arc or Circle")) (setq ss (ssget pt (list (cons 0 "Arc,Circle")))) (setq obj (vlax-ename->vla-object (ssname ss 0 ))) (if (= "AcDbArc" (vla-get-objectname obj)) (progn (setq endpt (vlax-curve-getEndPoint obj)) (setq totlen (vla-get-ArcLength obj)) (setq arclen (/ totlen ncrd)) (setq chrdpt (vlax-curve-getStartPoint obj)) (setq num 1) (command "_Pline" ) (while (= (getvar "cmdactive") 1 ) (command chrdpt) (repeat ncrd (command (vlax-curve-getPointatDist obj (* arclen num))) (setq num (+ num 1)) ) (command endpt) (command "") ) ) ) (if (= "AcDbCircle" (vla-get-objectname obj)) (progn (setq rad (vla-get-radius obj)) (setq cenpt (vlax-safearray->list (vlax-variant-value (vla-get-center obj)))) (setq totlen (* pi (* 2.0 rad))) (setq ang (/ (* pi 2.) ncrd)) (setq chrdpt (polar cenpt 0.0 rad)) (setq num 1.0) (command "_Pline" ) (while (= (getvar "cmdactive") 1 ) (command chrdpt) (repeat ncrd (command (polar cenpt (* num ang) rad)) (setq num (1+ num)) ) (command "c") ) ) ) (setvar "osmode" oldsnap) ) (princ) ) (c:arc2chords)
    1 point
  16. Maybe this: http://www.lee-mac.com/cwipe.html
    1 point
  17. I have moved your post to the AutoLISP, Visual LISP & DCL Forum. Please post in the appropriate Forum.
    1 point
×
×
  • Create New...