Jump to content

All Activity

This stream auto-updates

  1. Today
  2. If you would run through -OVERKILL you can see current settings and the options in the command line, just add what you need to the line in the LISP, just getting the selection and ENTER twice is going to default to last used settings. Command: -OVERKILL Select objects: all 1935 found 426 were not in current space. Select objects: Current settings: Tolerance=1.000000, Ignore=All, Optimize polylines=Yes, Combine partial overlap=Yes, Combine end-to-end=Yes Enter an option to change [Done/Ignore/tOlerance/optimize Plines/combine parTial overlap/combine Endtoend/Associativity] <done>: *Cancel* The Uppercase letters are the shortcut, i.e. for Tolerance use O (value), optimize Plines use P, etc. You might find something on this thread... I need overkill and ncopy !please help me! - AutoLISP, Visual LISP & DCL - AutoCAD Forums
  3. Thanks you all, Problem solved
  4. @SLW210 you are right. When I run the OVERKILL dialog with the options shown in the screenshot (tolerance 0.000001, all “Ignore object property” boxes checked, Optimize segments within polylines, Ignore polyline segment widths, Do not break polylines, Combine co-linear objects that partially overlap, Combine co-linear objects when aligned end to end, Maintain associative objects), I get exactly the result I want. I’d like to run this silently from LISP—no dialog—so that the same settings are always used. Calling it like this: (command "_.-OVERKILL" ss "" "") seems to use whatever options were last chosen in the dialog, not the fixed set I want. I tried to “force” the settings by editing the registry here: HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R24.3\ACAD-0001:409\Profiles\<<Unnamed Profile>>\Dialogs\Overkill but AutoCAD didn’t pick up the changes (no effect on command behavior). Questions: Is there a documented way to pass all of these options via the command-line version of OVERKILL in a single LISP call (i.e., set tolerance, ignore list, and all Yes/No toggles explicitly), so it doesn’t rely on the last-used dialog state? If not, is there another supported method (sysvars, .NET/ObjectARX API, etc.) to set OVERKILL options programmatically? Why don’t edits under the …\Dialogs\Overkill registry key take effect—am I writing to the wrong location, or are these values cached elsewhere/per-drawing? AutoCAD version: R24.3 (profile ACAD-0001:409). Goal: run OVERKILL on selected LINE and PLINE objects with the exact dialog settings above, without showing the dialog and without depending on last-used options. Thanks!
  5. i had some time so put together something, once I finished I realised could have been made simpler by just inserting the single blocks rather than using the dynamic block. Any way have a look at this. ; https://www.cadtutor.net/forum/topic/98637-how-to-stop-flip-action-reversing-offsets-in-dynamic-block/ ; See below (defun c:dyntruss ( / x truss num) (if (not LM:setdynpropvalue)(load "Dynamic block get-put Lee-mac")) ;; Set Dynamic Block Property Value - Lee Mac ;; Modifies the value of a Dynamic Block property (if present) ;; blk - [vla] VLA Dynamic Block Reference object ;; prp - [str] Dynamic Block property name (case-insensitive) ;; val - [any] New value for property ;; Returns: [any] New value if successful, else nil (defun LM:setdynpropvalue ( blk prp val ) (setq prp (strcase prp)) (vl-some '(lambda ( x ) (if (= prp (strcase (vla-get-propertyname x))) (progn (vla-put-value x (vlax-make-variant val (vlax-variant-type (vla-get-value x)))) (cond (val) (t)) ) ) ) (vlax-invoke blk 'getdynamicblockproperties) ) ) ; (LM:setdynpropvalue obj "Flip state1" flip) ; (LM:setdynpropvalue obj "Length" val1) ; (LM:SetVisibilityState obj "3+4+6") (defun trussdcl ( / fo ) (setq fo (open (setq fname (vl-filename-mktemp "" "" ".dcl")) "w")) (write-line " dyntruss : dialog { " fo) (write-line " label = \"Enter Values\" ; " fo) (write-line " : column { " fo) (write-line " width =25; " fo) (write-line " spacer_1 ; " fo) (write-line " : edit_box { " fo) (write-line " key = \"key1\" ; " fo) (write-line " label = \"Length \" ; " fo) (write-line " edit_width = 5; " fo) (write-line " edit_limit = 4; " fo) (write-line " is_enabled = true ; " fo) (write-line " allow_accept=true ; " fo) (write-line " } " fo) (write-line " spacer_1 ; " fo) (write-line " : edit_box { " fo) (write-line " key = \"key2\" ; " fo) (write-line " label = \"Angle \" ; " fo) (write-line " edit_width = 5; " fo) (write-line " edit_limit = 4; " fo) (write-line " is_enabled = true ; " fo) (write-line " allow_accept=true ; " fo) (write-line " } " fo) (write-line " spacer_1 ; " fo) (write-line " : radio_row { " fo) (write-line " : radio_button { " fo) (write-line " key = \"Rb1\" ; " fo) (write-line " label = \"Flipped\" ; " fo) (write-line " } " fo) (write-line " spacer_1 ; " fo) (write-line " : radio_button { " fo) (write-line " key = \"Rb2\" ; " fo) (write-line " label = \"No Flip\" ; " fo) (write-line " } " fo) (write-line " spacer_1 ; " fo) (write-line " } " fo) (write-line " spacer_1 ; " fo) (write-line " ok_cancel ; " fo) (write-line " } " fo) (write-line " } " fo) (close fo) (setq dcl_id (load_dialog fname)) (if (not (new_dialog "dyntruss" dcl_id) ) (exit) ) (set_tile "key1" "10") (set_tile "key2" "0") (set_tile "Rb2" "1") (action_tile "accept" "(setq val1 (atof (get_tile \"key1\")))(setq val2 (atof (get_tile \"key2\")))(setq val3 (atoi (get_tile \"Rb1\")))(done_dialog)") (action_tile "cancel" "(setq cancel \"yes\")(done_dialog)") (start_dialog) (unload_dialog dcl_id) (vl-file-delete fname) (princ) ) ;;;;;;;;;;;; starts here ;;;;;;;;;;;;;;; (setq oldsnap (getvar 'Osmode)) (setvar 'osmode 0) (trussdcl) (setq truss-size (list '(51 8 0 0 1 0) '(50 8 0 0 0 1) '(49 7 1 0 0 1) '(48 8 0 0 0 0) '(47 7 1 0 0 0) '(46 7 0 1 0 0) '(45 7 0 0 1 0) '(44 7 0 0 0 1) '(43 6 1 0 0 1) '(42 7 0 0 0 0) '(41 6 1 0 0 0) '(40 6 0 1 0 0) '(39 6 0 0 1 0) '(38 6 0 0 0 1) '(37 5 1 0 0 1) '(36 6 0 0 0 0) '(35 5 1 0 0 0) '(34 5 0 1 0 0) '(33 5 0 0 1 0) '(32 5 0 0 0 1) '(31 4 1 0 0 1) '(30 5 0 0 0 0) '(29 4 1 0 0 0) '(28 4 0 1 0 0) '(27 4 0 0 1 0) '(26 4 0 0 0 1) '(25 3 1 0 0 1) '(24 4 0 0 0 0) '(23 3 1 0 0 0) '(22 3 0 1 0 0) '(21 3 0 0 1 0) '(20 3 0 0 0 1) '(19 2 1 0 0 1) '(18 3 0 0 0 0) '(17 2 1 0 0 0) '(16 2 0 1 0 0) '(15 2 0 0 1 0) '(14 2 0 0 0 1) '(13 1 1 0 0 1) '(12 2 0 0 0 0) '(11 1 1 0 0 0) '(10 1 0 1 0 0) '(9 1 0 0 1 0) '(8 1 0 0 0 1) '(7 0 1 0 0 1) '(6 1 0 0 0 0) '(5 0 1 0 0 0) '(4 0 0 1 0 0) '(3 0 0 0 1 0) '(2 0 0 0 0 1)) ) (setq ss nil) (setq ss (ssadd)) (setq ang (* pi (/ val2 180.0))) (foreach val truss-size (if (= (car val) val1) (setq sizes val) ) ) (setq pt (getpoint "\nPick point for truss ")) (setq basept pt) (if (= val3 0) (setq flip "Not flipped") (setq flip "Flipped") ) (setq k 0 truss 7) (repeat 5 (setq k (1+ k) truss (1- truss)) (setq num (nth k sizes)) (if (= num 0) (princ (strcat "\nNo " (rtos truss 2 0) "m ")) (progn (repeat num (command "-insert" "d-d78" "s" 1 pt 0) (setq obj (vlax-ename->vla-object (entlast))) (LM:setdynpropvalue obj "Beam viz" (rtos truss 2 0)) (LM:setdynpropvalue obj "Angle1" ang) (setq ss (ssadd (entlast))) (setq pt (polar pt ang (* truss 1000.0))) ) ) ) ) (setvar 'osmode oldsnap) (princ) ) (c:dyntruss) https://www.lee-mac.com/ssget.html
  6. Best CAD Tips

    A Sneak Peek at “CAD for Grads!”

    Here’s a tiny glimpse from one of the lessons in my upcoming online course, CAD for Grads — designed to give recent graduates the essential AutoCAD® skills they need to hit the ground running in Design, Construction, Architecture, and Engineering. In this clip, you’ll see an unscripted race between two contestants trying to finish the […] The post A Sneak Peek at “CAD for Grads!” appeared first on Best CAD Tips. View the full article
  7. Yesterday
  8. harimaddddy

    Text content sync

    Hi sir, Thanks for the reply. With my basic knowledge in coding and use some AI help I have ended with below mentioned code. Works fine but if I reopen the drawing the link between text disappeared. I hope it have solutions and thanks in advance . (vl-load-com) ;; Global storage for set/view links (setq *set-view-links* nil) ;; Function to save set-view links to drawing dictionary (defun SaveSetViewLinks () (if *set-view-links* (progn (vl-propagate '*set-view-links*) (dictremove (namedobjdict) "SET_VIEW_LINKS") ; Remove old entry to avoid duplication (dictadd (namedobjdict) "SET_VIEW_LINKS" (vl-prin1-to-string *set-view-links*) ) ) ) (princ) ) ;; Function to load set-view links from drawing dictionary (defun LoadSetViewLinks () (if (setq dict (dictsearch (namedobjdict) "SET_VIEW_LINKS")) (progn (setq *set-view-links* (read (cdr (assoc 1 dict)))) ;; Validate loaded links to remove invalid handles (setq *set-view-links* (vl-remove-if '(lambda (link) (not (and (handent (car link)) ; Check if set exists (vl-every 'handent (cadr link))))) ; Check if all views exist *set-view-links*)) (if *set-view-links* (SaveSetViewLinks)) ; Save cleaned links ) ) (princ) ) (defun c:LINKTEXT (/ set views set-handle v-handles ent) (prompt "\nSelect the SET TEXT or MTEXT: ") (setq set (entsel)) ; Get full entsel output (if (and set (setq set (car set)) ; Extract entity name (wcmatch (cdr (assoc 0 (entget set))) "TEXT,MTEXT")) (progn ;; Change set text color to red for identification (entmod (subst (cons 62 1) (assoc 62 (entget set)) (entget set))) (entupd set) (setq set-handle (cdr (assoc 5 (entget set)))) ;; Select views (prompt "\nSelect VIEW TEXT or MTEXT entities: ") (setq views (ssget '((0 . "TEXT,MTEXT")))) (if views (progn (setq v-handles '()) (repeat (sslength views) (setq ent (ssname views 0)) (ssdel ent views) ;; Immediately match text (vla-put-TextString (vlax-ename->vla-object ent) (cdr (assoc 1 (entget set))) ) (setq v-handles (cons (cdr (assoc 5 (entget ent))) v-handles)) ) ;; Store link pair in global var (setq *set-view-links* (cons (list set-handle v-handles) *set-view-links*)) ;; Save links to dictionary (SaveSetViewLinks) (prompt "\nSet linked to views.") ) (prompt "\nNo view text selected.") ) ) (prompt "\nInvalid set entity.") ) (princ) ) (defun c:SYNCSET (/ link s-ent v-handles s-text v-obj) (if *set-view-links* (progn (foreach link *set-view-links* (setq s-ent (handent (car link))) (if s-ent (progn (setq s-text (cdr (assoc 1 (entget s-ent)))) (foreach v-handle (cadr link) (setq v-obj (handent v-handle)) (if v-obj (vla-put-TextString (vlax-ename->vla-object v-obj) s-text) ) ) ) ) ) (prompt "\nAll view texts updated from their sets.") ) (prompt "\nNo set-view links found.") ) (princ) ) (defun c:SELECTLINKED (/ pick handle result) (prompt "\nPick any linked text (set or view): ") (setq pick (entsel)) (if pick (progn (setq handle (cdr (assoc 5 (entget (car pick))))) (setq result (ssadd)) (foreach link *set-view-links* (cond ;; If picked is set ((equal (car link) handle) (if (handent (car link)) (ssadd (handent (car link)) result)) (foreach v-h (cadr link) (if (handent v-h) (ssadd (handent v-h) result)) ) ) ;; If picked is view ((member handle (cadr link)) (if (handent (car link)) (ssadd (handent (car link)) result)) (foreach v-h (cadr link) (if (handent v-h) (ssadd (handent v-h) result)) ) ) ) ) (if (> (sslength result) 0) (progn (sssetfirst nil result) (princ (strcat "\nSelected " (itoa (sslength result)) " linked texts.")) ) (prompt "\nNo linked texts found.") ) ) (prompt "\nNothing selected.") ) (princ) ) (defun c:UNLINKVIEW (/ set views set-handle new-views) (prompt "\nSelect SET TEXT: ") (setq set (entsel)) (if (and set (setq set (car set)) (wcmatch (cdr (assoc 0 (entget set))) "TEXT,MTEXT")) (progn (setq set-handle (cdr (assoc 5 (entget set)))) (prompt "\nSelect VIEWS to unlink: ") (setq views (ssget '((0 . "TEXT,MTEXT")))) (if views (progn (foreach link *set-view-links* (if (equal (car link) set-handle) (progn (setq new-views (vl-remove-if '(lambda (h) (ssmemb (handent h) views)) (cadr link))) (setq *set-view-links* (subst (list set-handle new-views) link *set-view-links*)) ) ) ) ;; Remove empty links (setq *set-view-links* (vl-remove-if '(lambda (link) (null (cadr link))) *set-view-links*)) ;; Save updated links to dictionary (SaveSetViewLinks) (prompt "\nViews unlinked.") ) (prompt "\nNo views selected.") ) ) (prompt "\nInvalid set.") ) (princ) ) (defun WarnIfDeletingSet (/ e) (if (and e (member (cdr (assoc 5 (entget e))) (mapcar 'car *set-view-links*))) (alert "WARNING: You are deleting a SET text linked to other texts!") ) ) ;; Add reactor for delete warning (vlr-command-reactor nil '((:vlr-commandWillStart . (lambda (reactor cmd) (if (wcmatch (strcase cmd) "ERASE") (progn (setq ss (ssget "_I")) (if ss (repeat (sslength ss) (WarnIfDeletingSet (ssname ss (setq idx (1- (sslength ss))))) ) ) ) ) ) ) ) ) ;; Load set-view links when LISP is loaded (LoadSetViewLinks) (prompt "\nCommands: LINKTEXT, SYNCSET, SELECTLINKED, UNLINKVIEW") (princ)
  9. David Devitt

    Table Building Mode - AutoCAD 2007/2008

    Thanks BIGAL!
  10. BIGAL

    Table Building Mode - AutoCAD 2007/2008

    Where I used to work we made a script for each user as they wanted different toolbars. Toolbar layer show Viewport show and so on I have a install lsp that does all the work like adding menu's support paths etc. I save the final workspace as the user name. If you go to options after setting everything up you can Export a profile, this makes a ARG file save it somewhere, you can also import a ARG file.
  11. BIGAL

    Text content sync

    A couple of suggestions. ; (prompt “\nSelect the SET TEXT or MTEXT: “) (setq set (car (entsel “\nSelect the SET TEXT or MTEXT: “))) If you want to force a selection of a certain type use SSGET as you have done in your code further down. (setq set (ssname (ssget ‘((0 . “TEXT,MTEXT”))) 0)) Better still have a look at this link. https://www.lee-mac.com/ssget.html Don't use "set", it is a reserved word and is used in lisp to do just that "set a value" rather than setq. Will try to make some time to look at your code.
  12. Compare d1 and d2 when it is trapezoid. If they are equal, then it is an parallelogram. For a quick solution, just replace the trapezoid formula, somewhere around line 160 in your original code (if (equal d1 d2 1e-4) (strcat label (itoa (setq count (1+ count))) " = " (rtos d1 2 2) " x " (rtos h 2 2) " = " (rtos surf 2 2) " t.µ.\\P" ) (strcat label (itoa (setq count (1+ count))) " = 1/2 x (" (rtos d1 2 2) " + " (rtos d2 2 2) ") x " (rtos h 2 2) " = " (rtos surf 2 2) " t.µ.\\P" ) )
  13. David Devitt

    Table Building Mode - AutoCAD 2007/2008

    Looks very promising; I'll check it out - thanks!
  14. SLW210

    Table Building Mode - AutoCAD 2007/2008

    Windows rollback might work. First see this... https://forums.augi.com/showthread.php?63018-AutoCAD-LT-2008-missing-toolbars&s=c8de2eac9c2dc8adda3ce7d928c84c57&p=724183&viewfull=1#post724183
  15. BlackBox

    AutoCAD Licensing

    Some state utilities also require a specific, legacy version (Florida Power & Light, as example), so the export back is required if we want construction approval. To expedite that task, I created a Windows Shell (aka context) menu so we can simply right click --> export DWG base files from file explorer using Core Console, then send. This Shell menu (and others) gets updated as we roll out new Autodesk product versions. Cheers
  16. the problem is that is not regognise the wrong polyogn. I prefear to do the updates to this code. This is the Mtext i want to export, nothing else. (defun c:areacal ( / AcDoc Space nw_style js nb ent dxf_ent ptlst n old_textsize count app_txt surf cum_area pt_ins val_txt lst_bis l_4d max_d pos pt1 pt2 pt3 d1 d2 h t_spc nw_obj ent_text key label scl ht *error*) (vl-load-com) ; Define error handler (defun *error* (msg) (if (not (member msg '("Function cancelled" "quit / exit abort"))) (princ (strcat "\nError: " msg)) ) (setvar "OSMODE" 9) (mapcar 'setvar '("clayer" "cecolor" "celtype" "celweight") (list "0" "BYLAYER" "BYLAYER" -1)) (if old_textsize (setvar "TEXTSIZE" old_textsize)) (vla-endundomark AcDoc) (princ) ) (setq AcDoc (vla-get-ActiveDocument (vlax-get-acad-object))) (vla-startundomark AcDoc) (setvar "OSMODE" 0) ; Set scale and text height (setq scl (getvar "useri1")) (setq ht (* 0.003 scl)) ; Create ΚΕΙΜ_Layout layer if it doesn't exist (if (null (tblsearch "LAYER" "ΚΕΙΜ_Layout")) (vlax-put (vla-add (vla-get-layers AcDoc) "ΚΕΙΜ_Layout") 'color 7) ) ; Create ΚΕΙΜ_Layout text style if it doesn't exist (if (null (tblsearch "STYLE" "ΚΕΙΜ_Layout")) (progn (setq nw_style (vla-add (vla-get-textstyles AcDoc) "ΚΕΙΜ_Layout")) (mapcar '(lambda (pr val) (vlax-put nw_style pr val) ) (list 'FontFile 'Height 'ObliqueAngle 'Width 'TextGenerationFlag) (list (strcat (getenv "windir") "\\fonts\\arial.ttf") 0.0 0.0 1.0 0.0) ) ) ) ; Prompt for label prefix (setq label (getstring "\nInsert prefix (π.χ A,B,C..,etc): ")) (if (eq label "") (setq label "E")) ; Select polylines (prompt "\nSelect polylines one by one (press Enter to finish): ") (setq js (ssget '((0 . "LWPOLYLINE") (-4 . "<AND") (-4 . "&") (70 . 1) (-4 . ">") (90 . 2) (-4 . "<") (90 . 5) (-4 . "AND>")))) (if js (progn (repeat (setq nb (sslength js)) (setq ent (ssname js (setq nb (1- nb))) dxf_ent (entget ent) ptlst (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) dxf_ent)) n (length ptlst) ) (if (eq n 4) (if (and (not (equal (rem (angle (car ptlst) (cadr ptlst)) pi) (rem (angle (caddr ptlst) (cadddr ptlst)) pi) 1E-08)) (not (equal (rem (angle (cadr ptlst) (caddr ptlst)) pi) (rem (angle (cadddr ptlst) (car ptlst)) pi) 1E-08)) ) (ssdel ent js) ) ) ) ) ) (cond ((and js (> (sslength js) 0)) (sssetfirst nil js) (initget "Yes No") (if (not (eq (getkword "\n Insert calculations [Yes/No]? <Yes>: ") "No")) (progn (sssetfirst nil nil) (setq old_textsize (getvar "TEXTSIZE") count 0 app_txt "" cum_area 0.0 ) (setvar "TEXTSIZE" ht) ; Process polylines sequentially (0 to n-1) (setq nb 0) (while (< nb (sslength js)) (setq ent (ssname js nb) dxf_ent (entget ent) ptlst (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) dxf_ent)) n (length ptlst) pt_ins (list (/ (apply '+ (mapcar 'car ptlst)) n) (/ (apply '+ (mapcar 'cadr ptlst)) n)) val_txt (if (eq n 3) (progn (setq lst_bis (append (cdr ptlst) (list (car ptlst))) l_4d (mapcar 'distance ptlst lst_bis) max_d (apply 'max l_4d) pos (vl-position max_d l_4d) pt1 (nth pos ptlst) pt2 (nth pos lst_bis) pt3 (car (vl-remove pt2 (vl-remove pt1 ptlst))) d1 (distance pt3 (inters pt1 pt2 pt3 (polar pt3 (+ (angle pt1 pt2) (* pi 0.5)) (distance pt1 pt2)) nil ) ) surf (* (atof (rtos max_d 2 2)) (atof (rtos d1 2 2)) 0.5) cum_area (atof (rtos (+ surf cum_area) 2 3)) ) (strcat label (itoa (setq count (1+ count))) " = " "1/2 x " (rtos max_d 2 2) " x " (rtos d1 2 2) " = " (rtos surf 2 2) " τ.μ.\\P" ) ) (if (and (equal (abs (- (rem (angle (car ptlst) (cadr ptlst)) pi) (rem (angle (car ptlst) (cadddr ptlst)) pi))) (* 0.5 pi) 1E-08) (equal (abs (- (rem (angle (cadr ptlst) (caddr ptlst)) pi) (rem (angle (caddr ptlst) (cadddr ptlst)) pi))) (* 0.5 pi) 1E-08) ) (progn (setq d1 (atof (rtos (distance (car ptlst) (cadr ptlst)) 2 2)) d2 (atof (rtos (distance (cadr ptlst) (caddr ptlst)) 2 2)) surf (atof (rtos (* d1 d2) 2 2)) cum_area (atof (rtos (+ surf cum_area) 2 2)) ) (strcat label (itoa (setq count (1+ count))) " = " (rtos d1 2 2) " x " (rtos d2 2 2) " = " (rtos surf 2 2) " τ.μ.\\P" ) ) (progn (if (equal (rem (angle (car ptlst) (cadr ptlst)) pi) (rem (angle (caddr ptlst) (cadddr ptlst)) pi) 1E-08) (setq d1 (atof (rtos (distance (car ptlst) (cadr ptlst)) 2 2)) d2 (atof (rtos (distance (caddr ptlst) (cadddr ptlst)) 2 2)) h (atof (rtos (distance (car ptlst) (inters (car ptlst) (polar (car ptlst) (+ (angle (car ptlst) (cadr ptlst)) (* 0.5 pi)) 1.0) (caddr ptlst) (cadddr ptlst) nil)) 2 2)) ) (setq d1 (atof (rtos (distance (cadr ptlst) (caddr ptlst)) 2 2)) d2 (atof (rtos (distance (car ptlst) (cadddr ptlst)) 2 2)) h (atof (rtos (distance (cadr ptlst) (inters (cadr ptlst) (polar (cadr ptlst) (+ (angle (cadr ptlst) (caddr ptlst)) (* 0.5 pi)) 1.0) (car ptlst) (cadddr ptlst) nil)) 2 2)) ) ) (setq surf (atof (rtos (* (+ d1 d2) h 0.5) 2 2)) cum_area (atof (rtos (+ surf cum_area) 2 2)) ) (strcat label (itoa (setq count (1+ count))) " = 1/2 x (" (rtos d1 2 2) " + " (rtos d2 2 2) ") x " (rtos h 2 2) " = " (rtos surf 2 2) " τ.μ.\\P" ) ) ) ) app_txt (strcat app_txt val_txt) ) (entmake (list '(0 . "TEXT") '(100 . "AcDbEntity") (cons 8 "ΚΕΙΜ_Layout") '(100 . "AcDbText") (cons 10 pt_ins) (cons 40 ht) (cons 1 (strcat label (itoa count))) (cons 50 (angle '(0 0 0) (getvar "UCSXDIR"))) '(41 . 1.0) '(51 . 0.0) (cons 7 "ΚΕΙΜ_Layout") '(71 . 0) '(72 . 1) (cons 11 pt_ins) (assoc 210 dxf_ent) '(100 . "AcDbText") '(73 . 2) ) ) (setq nb (1+ nb)) ) (initget "1 2") (setq t_spc (getkword "\n Insert calculations[1.Modelspace/2.Paperspace]? <1>: ")) (cond ((eq t_spc "2") (vla-put-ActiveSpace AcDoc acPaperSpace) (vla-put-MSpace AcDoc :vlax-false) (setq Space (vla-get-PaperSpace AcDoc)) (setvar "TEXTSIZE" 2.5) ) (T (vla-put-ActiveSpace AcDoc acModelSpace) (if (not (eq (getvar "TILEMODE") 1)) (vla-put-MSpace AcDoc :vlax-true)) (setq Space (vla-get-ModelSpace AcDoc)) (setvar "TEXTSIZE" ht) ) ) (setq nw_obj (vla-addMtext Space (vlax-3d-point (trans (getvar "VIEWCTR") 1 0)) 0.0 (strcat app_txt label "ολ = " (rtos cum_area 2 2) " τ.μ.") ) ) (mapcar '(lambda (pr val) (vlax-put nw_obj pr val) ) (list 'AttachmentPoint 'Height 'DrawingDirection 'StyleName 'Layer 'Rotation) (list 1 (getvar "TEXTSIZE") 5 "ΚΕΙΜ_Layout" "ΚΕΙΜ_Layout" 0.0) ) (setq ent_text (entlast) dxf_ent (entget ent_text) dxf_ent (subst (cons 90 1) (assoc 90 dxf_ent) dxf_ent) dxf_ent (subst (cons 63 255) (assoc 63 dxf_ent) dxf_ent) ) (entmod dxf_ent) (while (and (setq key (grread T 4 0)) (/= (car key) 3)) (cond ((eq (car key) 5) (setq dxf_ent (subst (cons 10 (trans (cadr key) 1 0)) (assoc 10 dxf_ent) dxf_ent)) (entmod dxf_ent) ) ) ) (setvar "TEXTSIZE" old_textsize) ) (T (sssetfirst nil nil) (princ "\nFunction canceled")) ) ) (T (princ "\nSelected items are invalid")) ) ; Reset system variables (mapcar 'setvar '("clayer" "cecolor" "celtype" "celweight") (list "0" "BYLAYER" "BYLAYER" -1)) (setvar "OSMODE" 9) (vla-endundomark AcDoc) (princ) ) Thanks
  17. We are thrilled to announce that AutoCAD 2026.1 and AutoCAD LT 2026.1 are now available, packed with exciting new features and enhancements designed to make your design experience more productive and collaborative. At Autodesk, we constantly strive to innovate and improve our tools based on user feedback, and these new 2026.1 releases are a testament to this commitment. We’ve made several significant updates to features that you’ll want to check out. If you’re already eager to dive into these new capabilities that AutoCAD has to offer, go ahead and open the Autodesk Access application to start your update while you read this post. Note: The 2026.1 update is automatically included in every new installation of AutoCAD 2026. Multi-User Markup – Desktop Integration One of the most significant enhancements in AutoCAD 2026.1 is the integration of Multi-User Markups within the desktop application, which allows multiple users to add markups to a single design to facilitate seamless collaboration. You can now access and incorporate markups created in AutoCAD on the web into your desktop workspace, ensuring that feedback and collaborative efforts are consolidated in one place. With AutoCAD 2026.1, these markups, made with the advanced yet easy-to-use markup tools now available via AutoCAD on the web, can now be accessed directly in the desktop application. As a refresher: multi-user markups allow you to streamline collaboration on Autodesk Docs projects by giving you the ability to collect and share feedback directly on drawings using intuitive Autodesk Docs markup tools. Although these markup tools are originally from Autodesk Docs, they are now available on AutoCAD on the web and accessible through the desktop application. In addition, the new SHARE command allows you to share DWGs stored on Docs for markup in web only, furthering the level of control you have in collaborative environments. TRACE layers enable users to markup files that continuously sync, providing flexibility for teams to review and markup changes together. This collaborative approach enables all feedback to be captured and addressed, leading to better project outcomes. This integration means that collaboration will now be much more productive, making it easier to incorporate changes and suggestions from multiple stakeholders, all while working within the familiar desktop environment. Merging “Learning” and “My Insights” Tab in App Home In AutoCAD 2026.1, the “Learning” and “My Insights” tabs have been combined into one convenient section in the App Home interface. This update eliminates the need to navigate between separate tabs, consolidating all the tutorials, tips, and personalized insights into a single, easy-to-access location. By merging these tabs, it provides a more cohesive and efficient experience. The streamlined layout simplifies navigation and reduces clutter, allowing you to quickly find valuable resources and customized insights tailored to your unique usage patterns. Whether you’re a seasoned professional or new to AutoCAD, this enhancement combines all efficiency and learning tools into one place, ensuring that you have a one-stop shop for boosting your AutoCAD efficiency. Smart Blocks UX Refinements Smart Blocks remains one of the most popular features in AutoCAD. With the 2026.1 update, we’ve made significant UX refinements to enhance its functionality. These refinements include an improved design and user interface, allowing you to create and manage Smart Blocks with greater ease. Detection Progress Indicator This new feature gives real-time updates on the status of block detection processes, allowing you to easily monitor and anticipate the completion of block detection operations. This enhancement increases transparency, enabling a more fluent and controlled workflow so you’ll know where you’re at in the process. Tooltips for Detection Actions New tooltips provide quick and informative hints regarding various detection tasks, enabling you to understand functionalities right in the product without needing to refer to external documentation. The addition of these tooltips contributes to reducing the learning curve, making Smart Blocks more approachable for both new and experienced users. New Option for Layer Assignment AutoCAD 2026.1 introduces a new option to assign block definition objects directly to layer 0. This enhancement simplifies the layer assignment process, ensuring that block definitions are organized efficiently and consistently. By assigning objects to layer 0, you can benefit from enhanced control over visibility and plot styles, leading to cleaner and more manageable drawings. These enhancements are focused on usability and performance, ensuring that you can work more efficiently. The refined UX makes it simpler to manipulate and deploy Smart Blocks within your designs, ultimately saving you time and reducing the effort needed for repetitive tasks. Seven New Productivity Enhancements AutoCAD 2026.1 now includes seven new productivity enhancements that address user pain points and significantly improve the overall user experience. Each of these new enhancements has been carefully designed to boost your productivity and satisfaction with AutoCAD. Here is a list of the included improvements. Please refer to the 2026.1 Help documentation for complete details. New VIEWPORTLAYER System Variable New REVCLOUDLAYER System Variable New TABLELAYER System Variable Increased the maximum number of active viewports Warm grip dynamic menu shortcut support REVCLOUD Arc length setting is no longer adjusted for new DIMSCALE Find and replace now works with multiline texts having “\P” line breaks Update to AutoCAD 2026.1 and AutoCAD LT 2026.1 Today If you already started your update at the beginning of this post, you should be one step closer to experiencing these features first-hand—if not, what are you waiting for? Get started with the Autodesk Access application on your desktop. And if you’re not yet a subscriber, be sure to check out free trials of AutoCAD 2026.1, AutoCAD LT 2026.1. Learn More To explore these features and enhancements in detail along with more additional updates included in the 2026.1 update, take a look at the following pages in the Help section: What’s New in AutoCAD 2026.1 What’s New in AutoCAD LT 2026.1 The post Introducing AutoCAD 2026.1: Collaborate With Multiple Users and Power Your Productivity With New Enhancements appeared first on AutoCAD Blog. View the full article
  18. texts containing control codes are deleted after selection... Reaction to the Command: (entget ex) ; error: invalid argument type: lentityp nil
  19. to be or no tobe a trapezoid or rectangle.dwg @mhy3sx please check the new dwg , I made a new polyline by offset base and leg and now the lisp take it as a rectangle .
  20. CyberAngel

    AutoCAD Licensing

    Just for the benefit of AutoCAD archaeologists who find this thread, some companies don't upgrade their software because their big clients don't upgrade. Yes, you can convert drawings when you send them out, but why take that extra step every single time you pass files? So you wind up with these clusters of late adopters, all looking at each other--"you go first" "no, you go first"--and putting off the ordeal of upgrading everyone, and every year it will become harder, until finally it's inevitable.
  21. Thanks for the answer ! I tested DOL and it unfortunately doesn’t solve my case. That routine keeps the single longest object from the entire selection, but it doesn’t check whether objects are collinear and overlapping. In my drawings I often have a LINE and a PLINE that lie on the same line with partial overlap; draw order puts the shorter one on top, so OVERKILL keeps the short piece. What I need is: Work with LINE and LWPOLYLINE (straight segments). Group only collinear segments whose projections overlap (within a small tolerance). In each group, keep the longest and delete the shorter overlapping pieces. Do not touch segments that are merely end-to-end (no overlap). Ignore draw order. If anyone has a LISP that does this “overlap-aware, keep-longest” behavior, I’d really appreciate it
  22. David Devitt

    Table Building Mode - AutoCAD 2007/2008

    I am hoping that you might have a simple suggestion on how to restore my workspace toolbars configuration. Hopefully I won't have to uninstall/reinstall my AutoCAD and rebuild my workspace as I'm expecting to have to.
  23. David Devitt

    Table Building Mode - AutoCAD 2007/2008

    Yep, that's what it was! I realized that it was a third party add-on from a few years ago that didn't fit my needs; uninstalled through Windows. Thank you!
  24. If you haven't solved it yet, there's another possibility: Replace '(setq en (ssname ss cnt))' with '(setq en (ssname ss cnt)) ex en)' Load the code and run it again. Then, type '(entget ex)' on the command line. If it returns the entity list, see if '(60 . 1)' appears anywhere.
  25. Hi @p7q, If this what you want, you can try with this: (prompt "\nTo run a LISP type: DOL (DeleteOverlappingLines)") (princ) (defun c:DOL ( / ss len i ename_length_list ename ename_length) (setq ss (ssget (list (cons 0 "*LINE"))) len (sslength ss) i 0 ename_length_list (list) ) (while (< i len) (setq ename (ssname ss i) ename_length (getpropertyvalue ename "Length") ename_length_list (append ename_length_list (list (list ename ename_length))) i (1+ i) ) ) (setq ename_length_list (vl-sort ename_length_list (function (lambda (x1 x2) (< (cadr x1) (cadr x2))))) ename_length_list (vl-remove (last ename_length_list) ename_length_list) total_len (itoa (length ename_length_list)) ) (foreach x ename_length_list (entdel (car x)) ) (prompt (strcat "\nThe total number of deleted lines is " total_len "!")) (princ) ) and you will get something like this (picture 1). Note: you need to select group by group to get only line or polyline with the highest length. Best regards.
  26. The issue is that in my case the longest object is underneath and the shorter one is on top in the draw order. When I run OVERKILL, it keeps the top-most object, which ends up deleting my longest segment. What I need is to always keep the longest overlapping segment (LINE or PLINE) and delete the shorter one, regardless of the draw order.
  1. Load more activity
×
×
  • Create New...