Jump to content

Leaderboard

Popular Content

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

  1. Has anyone tried the new Lisp in LT 2024? https://www.autodesk.com/products/autocad-lt/features
    1 point
  2. Hello everyone, I have one issue with dimension properties where I want to know if something can be done. We work with meters as units, and we make a lot of details so we've found a format that suits our needs but it means a lot of manual overrides. Basically, the dimensions are to be displayed with meters as the units, and we have the two first decimals for the cm as is, but we write the next or next two decimals for the mm range as superscript, stacking the last two digits. Is there any way to have the precision set to .0000 and stack the last two digits as default as opossite to manually override each dimension? Thanks in advance!
    1 point
  3. Hmmm interesting... https://help.autodesk.com/view/ACD/2015/ENU/?guid=GUID-6176FC98-DC5D-433E-8D76-F481BE68D46A
    1 point
  4. (alert "desired output :\nDN50-5000 W\n0,66 m/s\n180 pa/m")
    1 point
  5. Morning Guys, There is a total of 4 dialogs in the code, with the most active dialogs in the code atm is 3, and that is only because I have failed to close the first. ( that is a separate problem that still persists ) The problem (stack overflow) has not happend again since I stopped trying to do too many things at the same time!! I'm running Intellicad 11.1.374
    1 point
  6. That was me on Sunday - will see if I get a chance to look at this later but a holiday last week and the e-mails are going a little busy just now
    1 point
  7. Something like this. (defun c:d200 ( / pt1 pt2) (prompt "When asked points can be picked upside down to imply outward.") (setq pt1 (getpoint "\nSelect 1st point on left ")) (setq pt2 (getpoint "\nSelect 2nd point on right ")) (setq ang (angle pt1 pt2)) (setq pt3 (polar pt1 (+ ang (/ pi 2.0)) 200)) (command "dim" "Align" pt1 pt2 pt3 "" "exit") (setq pt3 (polar pt1 (+ ang (/ pi 2.0)) 300)) (command "dim" "Align" pt1 pt2 pt3 "" "exit") (princ) )
    1 point
  8. This is a mod to Mhupp code. ; Original code by Mhupp ; Modified by AlanH April 2023 ; sums text inside plines circles and ellipse ;;----------------------------------------------------------------------------;; ;; ssget "WP" doesn't work well with polylines with arcs. This fixes it. ;(defun C:sumtext ( / obj v i ii x bulge seg lst cir div seg dist ANG ANGSEG CEN CO-ORD CX CY ENT HT J PX PY SS SS1 SS2 TOT TXT WID) (defun C:sumtext ( / ) (setq SS (ssget '((0 . "*POLYLINE,CIRCLE,ELLIPSE")))) (repeat (setq J (sslength ss)) (setq ent (ssname ss (setq j (1- J)))) (setq obj (vlax-ename->vla-object ent)) (if (= (vla-get-objectname obj) "AcDbCircle") (progn (setq cir (vlax-get-property obj 'Circumference)) (setq seg (/ cir 40) dist 0.0 lst '()) (while (< dist cir) (setq lst (cons (vlax-curve-getPointAtDist obj dist) lst)) (setq dist (+ dist seg)) ) ) ) (If (= (vla-get-objectname obj) "AcDbPolyline") (progn (setq lst '()) (setq v (vlax-curve-getEndParam obj) i 0) (while (< i v) (if (/= 0 (abs (vlax-invoke obj 'GetBulge i))) ;pulled from lisp ronjonp linked (progn (setq ii 0) (if (>= (setq seg (fix (/ (- (vlax-curve-getDistAtParam obj (1+ i)) (vlax-curve-getDistAtParam obj i)) 0.25))) 5) (repeat seg (setq lst (cons (vlax-Curve-GetPointAtParam obj (+ i ii)) lst)) (setq ii (+ (/ 1.0 seg) ii)) ) (repeat 5 (setq lst (cons (vlax-Curve-GetPointAtParam obj (+ i ii)) lst)) (setq ii (+ 0.20 ii)) ) ) ) ) (setq lst (cons (vlax-Curve-GetPointAtParam obj i) lst)) (setq i (1+ i)) ) (setq lst (cons (vlax-Curve-GetPointAtParam obj i) lst)) ) ) (If (= (vla-get-objectname obj) "AcDbEllipse") (progn (setq ang 0.0) (setq angseg (/ (* 2 pi) 40.)) (setq cen (vlax-get obj 'center)) (setq cx (car cen) cy (cadr cen)) (setq wid (vlax-get obj 'MajorRadius)) (setq ht (vlax-get obj 'MinorRadius)) (setq lst '()) (repeat 40 (setq px (+ cx (* wid (cos ang)))) (setq py (+ cy (* ht (sin ang)))) (setq lst (cons (list px py) lst)) (setq ang (+ ang angseg)) ) ) ) (setq ss1 (ssget "WP" lst '((0 . "*TEXT")))) (setq SS2 (ssget "F" lst '((0 . "*TEXT")))) (if (= ss2 nil) (princ) (repeat (setq jj (sslength ss2)) (setq ss1 (ssadd (ssname ss2 (setq jj (1- jj))) ss1)) ) ) (if (= ss1 nil) (alert "No text selected will now exit ") (progn (setq tot 0.0) (repeat (setq kk (sslength ss1)) (setq txt (cdr (assoc 1 (entget (ssname ss1 (setq kk (1- kk))))))) (setq tot (+ (atof txt) tot)) ) ; (alert (strcat "Total is " (rtos tot 2 2 ) " for " (vla-get-objectname obj) " " (rtos (sslength ss1) 2 0) " Items")) (entmake (list (cons 0 "TEXT")(cons 10 (getpoint (car lst) "\nDar punto de inserción para texto final:"))(cons 40 (getvar 'textsize))(cons 1 (rtos tot 2 2) ))) ) ) ) (princ) ) (c:sumtext)
    1 point
  9. Save some find/replace pairs, then type the following at the AutoCAD command-line: (findfile "LMAC_BFind_SavedSearches_V2-0.txt")
    1 point
×
×
  • Create New...