Leaderboard
Popular Content
Showing content with the highest reputation on 02/20/2023 in all areas
-
And simply this ? (defun c:CYL_BREAK ( / pt1 pt2 pt-mid) ; Get the first point using a point selection dialog box (initget 1) (setq pt1 (getpoint "\nSpecify first point: ")) ; Get the second point using a point selection dialog box (initget 33) (setq pt2 (getpoint pt1 "\nSpecify second point: ") pt-mid (mapcar '* (mapcar '+ pt1 pt2) '(0.5 0.5 0.5)) ) ; Draw the break using a polyline (entmakex (list '(0 . "LWPOLYLINE") '(100 . "AcDbEntity") '(8 . "Break") '(62 . 1) '(100 . "AcDbPolyline") '(90 . 4) '(70 . 0) (cons 10 pt1) (cons 42 (1- (sqrt 2))) (cons 10 pt-mid) (cons 42 (- 2 (sqrt 2))) (cons 10 pt2) (cons 42 (- 2 (sqrt 2))) (cons 10 pt-mid) ) ) (prin1) )2 points
-
Using dxf codes what you want is there. (CONS 0 "DIMSTYLE") ;Entity Type (CONS 100 "AcDbSymbolTableRecord") ;Subclass marker (CONS 100 "AcDbDimStyleTableRecord") ;Subclass marker (CONS 2 xname$) ;Dimstyle name (CONS 70 0) ;Standard flag value (CONS 3 "") ;DIMPOST - Prefix and suffix for dimension text (CONS 4 "") ;DIMAPOST - Prefix and suffix for alternate text ;;(CONS 5 "ARR1") -DXF CODES OBSOLETE ;DIMBLK - Arrow block name ;;(CONS 6 "ARR1") -DXF CODES OBSOLETE ;DIMBLK1 - First arrow block name ;;(CONS 7 "") -DXF CODES OBSOLETE ;DIMBLK2 - Second arrow block name (CONS 40 100.0) ;DIMSCALE - Overall Scale Factor (CONS 41 1.0) ;DIMASZ - Arrow size (CONS 42 2.0) ;DIMEXO - Extension line origin offset (CONS 43 0.0) ;DIMDLI - Dimension line spacing (CONS 44 2.0) ;DIMEXE - Extension above dimension line (CONS 45 0.0) ;DIMRND - Rounding value (CONS 46 0.0) ;DIMDLE - Dimension line extension (CONS 47 0.0) ;DIMTP - Plus tolerance (CONS 48 0.0) ;DIMTM - Minus tolerance (CONS 140 xheight$) ;DIMTXT - Text height (CONS 141 0.09) ;DIMCEN - Centre mark size (CONS 142 0.0) ;DIMTSZ - Tick size (CONS 143 25.4) ;DIMALTF - Alternate unit scale factor (CONS 144 1.0) ;DIMLFAC - Linear unit scale factor (CONS 145 0.0) ;DIMTVP - Text vertical position (CONS 146 1.0) ;DIMTFAC - Tolerance text height scaling factor (CONS 147 1.0) ;DIMGAP - Gape from dimension line to text (CONS 71 0) ;DIMTOL - Tolerance dimensioning (CONS 72 0) ;DIMLIM - Generate dimension limits (CONS 73 0) ;DIMTIH - Text inside extensions is horizontal (CONS 74 0) ;DIMTOH - Text outside horizontal (CONS 75 0) ;DIMSE1 - Suppress the first extension line (CONS 76 0) ;DIMSE2 - Suppress the second extension line (CONS 77 1) ;DIMTAD - Place text above the dimension line (CONS 78 0) ;DIMZIN - Zero suppression (CONS 170 0) ;DIMALT - Alternate units selected (CONS 171 2) ;DIMALTD - Alternate unit decimal places (CONS 172 0) ;DIMTOFL - Force line inside extension lines (CONS 173 0) ;DIMSAH - Separate arrow blocks (CONS 174 0) ;DIMTIX - Place text inside extensions (CONS 175 0) ;DIMSOXD - Suppress outside dimension lines (CONS 176 1) ;DIMCLRD - Dimension line and leader color (CONS 177 1) ;DIMCLRE - Extension line color (CONS 178 xcolor$) ;DIMCRRT - Dimension text color (CONS 270 2) ;DIMUNIT (Obsolete in 2011, DIMLUNIT and DIMFRAC) (CONS 271 0) ;DIMADEC - Angular decimal places (CONS 272 0) ;DIMTDEC - Tolerance decimal places (CONS 273 2) ;DIMALTU - Alternate units (CONS 274 2) ;DIMALTTD - Alternate tolerance decimal places (CONS 275 0) ;DIMAUNIT - Angular unit format (CONS 280 0) ;DIMJUST - Justification of text on dimension line (CONS 281 0) ;DIMSD1 - Suppress the first dimension line (CONS 282 0) ;DIMSD2 - Suppress the second dimensions line (CONS 283 1) ;DIMTOLJ - Tolerance vertical justification (CONS 284 0) ;DIMTZIN - Zero suppression (CONS 285 0) ;DIMALTZ - Alternate unit zero suppression (CONS 286 0) ;DIMALTTZ - Alternate tolerance zero suppression (CONS 287 5) ;DIMFIT (Obsolete in 2011, DIMATFIT and DIMTMOVE) (CONS 288 1) ;DIMUPT - User positioned text (CONS 340 (TBLOBJNAME "STYLE" xstyle$)) ;DIMTXSTY - Text style (CONS 341 (CDR (ASSOC 330 (ENTGET (TBLOBJNAME "BLOCK" xstyle$)))) ) ;DIMLDRBLK - Leader arrow block name (CONS 342 (CDR (ASSOC 330 (ENTGET (TBLOBJNAME "BLOCK" xstyle$)))) ) ;DIMBLK - Arrow block name (CONS 343 (CDR (ASSOC 330 (ENTGET (TBLOBJNAME "BLOCK" xstyle$)))) ) ;DIMBLK1 - First arrow block name (CONS 344 (CDR (ASSOC 330 (ENTGET (TBLOBJNAME "BLOCK" xstyle$)))) ) ;DIMBLK2 - Second arrow block name2 points
-
Just a maybe by adding \\f %tc1> then the original text can be lower case but the field will be Capitals. Only if required (DEFUN C:TDA2 (/ CONJUNTO CONTENIDO MAYUSCULA P1 TEXTO TEXTO-$ TEXTO-ENT ) (SETQ P1 (GETPOINT "\nUBIQUE EL TEXTO")) (PRINC "\nSELECCIONE EL TEXTO") (SETQ CONJUNTO (SSGET "_+.:E:S" '((0 . "TEXT")))) (SETQ TEXTO-ENT (SSNAME CONJUNTO 0)) (SETQ TEXTO-$ (CDR (ASSOC 1 (ENTGET TEXTO-ENT)))) (SETQ CONTENIDO (STRCAT "%<\\AcObjProp Object(%<\\_ObjId " (ITOA (VLA-GET-OBJECTID (VLAX-ENAME->VLA-OBJECT TEXTO-ENT))) ">%).TextString \\f %tc1>%")) (COMMAND "_TEXT" "_S" "MFEC2" "_J" "_M" P1 2 90 "a") (VLA-PUT-TEXTSTRING (VLAX-ENAME->VLA-OBJECT (entlast)) CONTENIDO) (princ) ) (c:tda2)2 points
-
Thank you dan20047, I used the Microsoft XPS printer which recognizes the paper sizes I already created for Nitro PDF creator. I only have to set up the Print settings for Nitro, apply to layout and then just change the printer in the command without changing any of the of the settings: After this I used the the topic on theswamp with the Ghostscript you suggested and the bat file which converts all the XPS Files inside the current folder. https://www.theswamp.org/index.php?topic=50646.0 I only added a command to change the current directory and a command to delete the XPS files after they have been converted: Finally I call the bat file at the end of the lisp file with the following command:1 point
-
1 point
-
1 point
-
thanks you both for your comments. and these are really what i wanted.1 point
-
For this I have a block, set to the proportions I want.. insert and scale. Back to your question, ChatGPT is coming up more regularly here, and on other forums and it is important perhaps to understand how it works a little - as far as I understand it zooms through the internet and finds the most probable next line to use, whether this is a LISP, a poem or a recipe for cookies. It does not have programming knowledge, it is just doing educated guesses. And so it's use should be taken as 'it might work' and a lot of checking and validation is still needed. You have to be able to debug what it produces and work out what it is doing. If it was me I would be using internet searches: How to make a arc with LISP - this is 3 arcs. How to make block with LISP How to get points, angles between points and distance between points with LISP How to insert a block with LISP it is all out there to copy and paste. So try this... copied and pasted from my library but mostly learnt from copying what is online (defun c:pipe_end ( / MyBlk) (defun makearc ( ArcPt ArcRad ArcAnga ArcAngb / ) (entmake (list '(0 . "ARC") '(100 . "AcDbEntity") (cons 10 ArcPt) (cons 40 ArcRad) (cons 50 ArcAnga) (cons 51 ArcAngb) )) ) (defun RtD ( r / ) (* 180.0 (/ r pi)) ) (setq pta (getpoint "Select Start Point")) (setq ptb (getpoint "Select End Point")) (setq diameter (distance pta ptb)) (setq MyScale (/ diameter 100)) (setq rotation (- (RtD (angle pta ptb)) 90)) (entmake '( (0 . "BLOCK") (8 . "0") (2 . "Pipe_End") (70 . 2) (4 . "") (8 . "0") (62 . 0) (6 . "ByBlock") (370 . -2) (10 0.0 0.0 0.0) )) (makearc '(-18.0244 29.2613) '34.3672 '5.2645 '0.7944) (makearc '(11.3941 25) '27.4741 '1.9984 '4.2848) (makearc '(-11.4084 75) '27.48 '5.1405 '1.1427) (entmake '( (0 . "ENDBLK") (8 . "0") (8 . "0") (62 . 0) (6 . "ByBlock") (370 . -2) )) (command "insert" "Pipe_End" pta MyScale MyScale rotation) (setq MyBlk Entlast) )1 point
-
(VL-LOAD-COM) (SETQ E (SSNAME (SSGET "_:S+." '((0 . "insert"))))) (VLA-GETBOUNDINGBOX (VLAX-ENAME->VLA-OBJECT E) 'LL 'UR) (SETQ LL- (VLAX-SAFEARRAY->LIST LL)) ; low left xyz point (SETQ UR- (VLAX-SAFEARRAY->LIST UR)) ;up rigth XYZ point (SETQ LL-ID (MAPCAR '/ (MAPCAR '+ LL- UR-) '(2 2 2))) ; the blockreference central point1 point
-
When you array it can do 2 things make the objects as single objects or remember all the objects as if they were one item, if the latter then explode the array. pretty sure there is a variable you can set but I just hit explode.1 point
-
You are correct (actually you helped me notice that I had not deleted the temporary line prior to the array, so I remade it). The drawing is attached. So now I'm at the point where the array is made and I'm ready to delete those 3 lower lines. The problem is I don't know how (my attempts lead me to erase the entire object) chapter 5 drawing 5-1.WIP.dwg1 point
-
Hola , no muy elegante pero da el resultado. (DEFUN C:TDA2 (/ CONJUNTO CONTENIDO MAYUSCULA P1 TEXTO TEXTO-$ TEXTO-ENT ) (SETQ P1 (GETPOINT "\nUBIQUE EL TEXTO")) (PRINC "\nSELECCIONE EL TEXTO") (SETQ CONJUNTO (SSGET "_+.:E:S" '((0 . "TEXT")))) (SETQ TEXTO-ENT (SSNAME CONJUNTO 0)) (SETQ TEXTO-$ (CDR (ASSOC 1 (ENTGET TEXTO-ENT)))) (SETQ MAYUSCULA (STRCASE TEXTO-$)) (VLA-PUT-TEXTSTRING (VLAX-ENAME->VLA-OBJECT TEXTO-ENT) MAYUSCULA) (SETQ CONTENIDO (STRCAT "%<\\AcObjProp Object(%<\\_ObjId " (ITOA (VLA-GET-OBJECTID (VLAX-ENAME->VLA-OBJECT TEXTO-ENT))) ">%).TextString>%")) (COMMAND "_TEXT" "_S" "MFEC2" "_J" "_M" P1 2 90 CONTENIDO) (VLA-PUT-TEXTSTRING (VLAX-ENAME->VLA-OBJECT TEXTO-ENT) TEXTO-$) (PRINC) ) Consiste en obtener el STRING del TEXTO-ENT , convertirlo en mayúscula como un nuevo STRING , modifica el texto-ent , lo usa para crear el field , lo pone en el punto elegido , y recupera el valor original del texto. TEXTO - TDA2.lsp texto a campo en mayuscula.dwg1 point
-
I don't know but lets take a guess and see? This might or might not work, but more than half the time a good guess will or get me close. Lets look at the code above then and see what it say... Hmm....TextHeight: (setq TextHeight (cons (vla-Get-TextHeight (vlax-ename->vla-object dim) ) TextHeight )) This is a part of a loop., TextHeight, then something and append the old TextHeght values to it. TextHeight is a list.. maybe we can make a variable TextScale and do the same thing with that. Next part: vla-get-textheight.,. hmm get text height, I wonder if there is something get-scale ? Lets do a search on a list of vla-get functions (I did it for you https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/complete-list-of-vl-vla-and-vlax-functions/td-p/4666405). Looking does something that says scale, maybe vla-get-scale Just a guess and working through it. try this: (defun C:TEXTHEIGHT (/ SS TEXTHEIGHT TextScale) ;;Added TEXTSCALE here (vl-load-com) (if (setq ss (ssget '((0 . "DIMENSION")))) (foreach dim (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss))) (setq TextHeight (cons (vla-Get-TextHeight (vlax-ename->vla-object dim) ) TextHeight )) (setq TextScale (cons (vla-Get-scale (vlax-ename->vla-object dim) ) TextScale )) ;; added this line here ) ; foreach ) ; if (princ ) ) Wonder if that works? (Weekend CAD is off so not testing this, just guessing and giving you a couple of hints what to look for to change). If Scale doesn't work see what else there might be that is similar and try that (another hint here... I don't think it is scale but I think it is in that list and around that area of the list in the link above)1 point
-
Here you are : (defun c:lins2blks-ins ( / *error* tttt wcs initvalueslst ucsf ti ch ss si sl r fuzz i pl speplst en ex speneplst spepall pts ) (defun *error* ( m ) (if wcs (if ucsf (while (not (and (equal (getvar (quote ucsxdir)) (car ucsf) 1e-6) (equal (getvar (quote ucsydir)) (cadr ucsf) 1e-6) (equal (trans (list 0.0 0.0 1.0) 1 0 t) (caddr ucsf) 1e-6) ) ) (exe (list "_.UCS" "_P")) ) ) ) (while (= 8 (logand 8 (getvar (quote undoctl)))) (if (not (exe (list "_.UNDO" "_E"))) (if doc (vla-endundomark doc) ) ) ) (if initvalueslst (mapcar (function apply_cadr->car) initvalueslst) ) (foreach fun (list (quote tttt) (quote vl-load) (quote exe) (quote cmdfun) (quote cmderr) (quote catch_cont) (quote apply_cadr->car) (quote ftoa)) (setq fun nil) ) (if doc (vla-regen doc acactiveviewport) ) (if m (prompt m) ) (princ) ) (defun tttt ( wcs / sysvarpreset sysvarlst sysvarvals ) ;;; wcs (T/nil) ;;; cad, doc, alo, spc - global variables (Visual Lisp main VLA-OBJECT pointers) ;;; vl-load exe cmdfun cmderr catch_cont apply_cadr->car ftoa - library sub functions common for standard template initialization ;;; (defun vl-load nil (or cad (if vlax-get-acad-object (setq cad (vlax-get-acad-object)) (progn (vl-load-com) (setq cad (vlax-get-acad-object)) ) ) ) (or doc (setq doc (vla-get-activedocument cad))) (or alo (setq alo (vla-get-activelayout doc))) (or spc (setq spc (vla-get-block alo))) ) ;;; sometimes not needed to use/initialize AxiveX Visual Lisp extensions - (comment/uncomment) following line ;;; (or (and cad doc alo spc) (vl-load)) (defun exe ( tokenslist ) ( (lambda ( tokenslist / ctch ) (if (vl-catch-all-error-p (setq ctch (cmdfun tokenslist t))) (progn (cmderr tokenslist) (catch_cont ctch) ) (progn (while (< 0 (getvar (quote cmdactive))) (vl-cmdf "") ) t ) ) ) tokenslist ) ) (defun cmdfun ( tokenslist flag / ctch ) ;;; tokenslist - command parameters list of strings ;;; flag - if "t" specified, upon successful execution returns t, otherwise if "nil" specified, return is always nil no matter what outcome of function execution is - it should be successful anyway if specified tokenslist was hardcoded correctly... ;;; (if command-s (if flag (if (not (vl-catch-all-error-p (setq ctch (vl-catch-all-apply (function command-s) tokenslist)))) flag ctch ) (if (vl-catch-all-error-p (setq ctch (vl-catch-all-apply (function command-s) tokenslist))) ctch ) ) (if flag (if (not (vl-catch-all-error-p (setq ctch (vl-catch-all-apply (function vl-cmdf) tokenslist)))) flag ctch ) (if (vl-catch-all-error-p (setq ctch (vl-catch-all-apply (function command) tokenslist))) ctch ) ) ) ) (defun cmderr ( tokenslist ) ;;; tokenslist - list of tokens representing command syntax at which used (cmdfun) failed with successful execution ;;; (prompt (strcat "\ncommand execution failure... error at used command tokenslist : " (vl-prin1-to-string tokenslist))) ) (defun catch_cont ( ctch / gr ) (prompt "\nleft mouse click to continue or enter to generate catch error - ESC to break...") (while (and (vl-catch-all-error-p (or ctch (setq ctch (vl-catch-all-apply (function /) (list 1 0))))) (setq gr (grread)) (/= (car gr) 3) (not (equal gr (list 2 13))) ) ) (if (vl-catch-all-error-p ctch) ctch ) ) (defun apply_cadr->car ( sysvarvaluepair / ctch ) (setq ctch (vl-catch-all-apply (function setvar) sysvarvaluepair)) (if (vl-catch-all-error-p ctch) (progn (prompt (strcat "\ncatched error on setting system variable : " (vl-prin1-to-string (vl-symbol-name (car sysvarvaluepair))) " with value : " (vl-prin1-to-string (cadr sysvarvaluepair)))) (catch_cont ctch) ) ) ) (defun ftoa ( n / m a s b ) (if (numberp n) (progn (setq m (fix ((if (< n 0) - +) n 1e-8))) (setq a (abs (- n m))) (setq m (itoa m)) (setq s "") (while (and (not (equal a 0.0 1e-6)) (setq b (fix (* a 10.0)))) (setq s (strcat s (itoa b))) (setq a (- (* a 10.0) b)) ) (if (= (type n) (quote int)) m (if (= s "") m (if (and (= m "0") (< n 0)) (strcat "-" m "." s) (strcat m "." s) ) ) ) ) ) ) (setq sysvarpreset (list (list (quote cmdecho) 0) (list (quote 3dosmode) 0) (list (quote osmode) 0) (list (quote unitmode) 0) (list (quote cmddia) 0) (list (quote ucsvp) 0) (list (quote ucsortho) 0) (list (quote projmode) 0) (list (quote orbitautotarget) 0) (list (quote insunits) 0) (list (quote hpseparate) 0) (list (quote hpgaptol) 0) (list (quote halogap) 0) (list (quote edgemode) 0) (list (quote pickdrag) 0) (list (quote qtextmode) 0) (list (quote dragsnap) 0) (list (quote angdir) 0) (list (quote aunits) 0) (list (quote limcheck) 0) (list (quote gridmode) 0) (list (quote nomutt) 0) (list (quote apbox) 0) (list (quote attdia) 0) (list (quote blipmode) 0) (list (quote copymode) 0) (list (quote circlerad) 0.0) (list (quote filletrad) 0.0) (list (quote filedia) 1) (list (quote autosnap) 1) (list (quote objectisolationmode) 1) (list (quote highlight) 1) (list (quote lispinit) 1) (list (quote layerpmode) 1) (list (quote fillmode) 1) (list (quote dragmodeinterrupt) 1) (list (quote dispsilh) 1) (list (quote fielddisplay) 1) (list (quote deletetool) 1) (list (quote delobj) 1) (list (quote dblclkedit) 1) (list (quote attreq) 1) (list (quote explmode) 1) (list (quote frameselection) 1) (list (quote ltgapselection) 1) (list (quote pickfirst) 1) (list (quote plinegen) 1) (list (quote plinetype) 1) (list (quote peditaccept) 1) (list (quote solidcheck) 1) (list (quote visretain) 1) (list (quote regenmode) 1) (list (quote celtscale) 1.0) (list (quote ltscale) 1.0) (list (quote osnapcoord) 2) (list (quote grips) 2) (list (quote dragmode) 2) (list (quote lunits) 2) (list (quote pickstyle) 3) (list (quote navvcubedisplay) 3) (list (quote pickauto) 3) (list (quote draworderctl) 3) (list (quote expert) 5) (list (quote auprec) 6) (list (quote luprec) 6) (list (quote pickbox) 6) (list (quote aperture) 6) (list (quote osoptions) 7) (list (quote dimzin) 8) (list (quote pdmode) 35) (list (quote pdsize) -1.5) (list (quote celweight) -1) (list (quote cecolor) "BYLAYER") (list (quote celtype) "ByLayer") (list (quote clayer) "0") ) ) (setq sysvarlst (mapcar (function car) sysvarpreset)) (setq sysvarvals (mapcar (function cadr) sysvarpreset)) (setq sysvarvals (vl-remove nil (mapcar (function (lambda ( x ) (if (getvar x) (nth (vl-position x sysvarlst) sysvarvals)) )) sysvarlst ) ) ) (setq sysvarlst (vl-remove-if-not (function (lambda ( x ) (getvar x) )) sysvarlst ) ) (setq initvalueslst (apply (function mapcar) (cons (function list) (list sysvarlst (mapcar (function getvar) sysvarlst) ) ) ) ) (apply (function mapcar) (cons (function setvar) (list sysvarlst sysvarvals ) ) ) (while (= 8 (logand 8 (getvar (quote undoctl)))) (if (not (exe (list "_.UNDO" "_E"))) (if doc (vla-endundomark doc) ) ) ) (if (not (exe (list "_.UNDO" "_M"))) (if doc (vla-startundomark doc) ) ) (if wcs (if (= 0 (getvar (quote worlducs))) (progn (setq ucsf (list (getvar (quote ucsxdir)) (getvar (quote ucsydir)) (trans (list 0.0 0.0 1.0) 1 0 t) ) ) (exe (list "_.UCS" "_W")) ) ) ) wcs ) (setq wcs (tttt t)) ;;; starting "library" template sub function - initialization ;;; (initget 1 "Yes No") (setq ch (getkword "\nDo you want to trim lines after their extensions without gaps [Yes / No] : ")) (initget 6) (setq r (cond ( (getdist "\nPick or specify radius of circles making blocks <0.75> it is needed for lines distances fuzz value : ") ) ( 0.75 ) )) (setq fuzz (* r (/ 4.0 3.0))) (prompt "\nSelect lines and blocks to extend lines to blocks centers on unlocked Layer(s)...") (if (setq ss (ssget "_:L" (list (cons 0 "LINE,INSERT")))) (progn (setq ti (car (_vl-times))) (sssetfirst nil ss) (setq si (ssget "_I" (list (cons 0 "INSERT")))) (sssetfirst nil ss) (setq sl (ssget "_I" (list (cons 0 "LINE")))) (sssetfirst) (repeat (setq i (sslength si)) (setq pl (cons (cdr (assoc 10 (entget (ssname si (setq i (1- i)))))) pl)) ) (repeat (setq i (sslength sl)) (setq speplst (cons (list (cdr (assoc 10 (setq ex (entget (setq en (ssname sl (setq i (1- i)))))))) (cdr (assoc 11 ex))) speplst)) (setq speneplst (cons (list (caar speplst) en (cadar speplst)) speneplst)) ) (setq spepall (apply (function append) speplst)) (foreach p pl (setq spepall (vl-sort spepall (function (lambda ( a b ) (< (distance a p) (distance b p)))))) (setq pts (vl-remove-if-not (function (lambda ( pp ) (< (distance pp p) fuzz))) spepall)) (foreach spenep speneplst (if (vl-some (function (lambda ( x ) (equal x (car spenep) 1e-6))) pts) (entupd (cdr (assoc -1 (entmod (subst (cons 10 p) (assoc 10 (setq ex (entget (cadr spenep)))) ex))))) ) (if (vl-some (function (lambda ( x ) (equal x (caddr spenep) 1e-6))) pts) (entupd (cdr (assoc -1 (entmod (subst (cons 11 p) (assoc 11 (setq ex (entget (cadr spenep)))) ex))))) ) ) ) (if (= ch "Yes") (repeat (setq i (sslength sl)) (setq en (ssname sl (setq i (1- i)))) (setq ex (entget en)) (setq ex (subst (cons 10 (polar (cdr (assoc 10 ex)) (angle (cdr (assoc 10 ex)) (cdr (assoc 11 ex))) r)) (assoc 10 ex) ex)) (setq ex (subst (cons 11 (polar (cdr (assoc 11 ex)) (angle (cdr (assoc 11 ex)) (cdr (assoc 10 ex))) r)) (assoc 11 ex) ex)) (entupd (cdr (assoc -1 (entmod ex)))) ) ) (prompt "\nElapsed time : ") (prompt (ftoa (- (car (_vl-times)) ti))) (prompt " milliseconds...") (prompt "\nFor UNDO - type \"UNDO\" - \"Back\" option...") ) ) (*error* nil) ) HTH. M.R.1 point
-
If you saved DWG prior any intervention with blocks as circles and lines going start/end to center of circles, it would be very easy to modify such lines with (polar) function to make lines shorter by radius of circles from both ends and with the same angle lines were before...1 point
-
1 point
-
Have you tried ghostscript as a printer? Haven't used in years but I recall it may print to file w/out dialog. https://www.ghostscript.com/releases/index.html See also this topic on theswamp https://www.theswamp.org/index.php?topic=50646.01 point
-
1 point
-
I see no reason why you couldn't use AutoCAD to create a 3D model of the objects depicted in your attached image. I used AutoCAD to create 3D models for a specialty chemical company and had no problems. The models included tanks, pumps, work platforms, valves, piping, steel work, etc.1 point
-
This is a possible answer via lisp you pick the two cnr points you can then do a little window search and find the other 4 lines (ssget), now make your two lines but remember the two lines as objects (entlast) then its a case of trim/extend using the object collection. I do some auto multiple fillets so I know the method should work for trim also, sorry dont have code. Will see if I can find time if others do not do it first.1 point