Jump to content

All Activity

This stream auto-updates

  1. Past hour
  2. Today
  3. Marko_ribar I want to ask a question about Plpath.lsp. Some times I select the option Top but draw the line Bottom. How the code undestand the Top or the Bottom? All my polylines are CCW. The Top / Bottom is not working well. Is better if I had an option to pick the side. (defun c:PlPath ( / rlw AssocOn ListClockwise-p MR:GetVertices MR:GetBulge _intl prelst suflst _Buildlist loop sp ep ss opt i pl hpllst rpllst pll a b bb ab lst lstab Pls Bls PtlSt PtBulg PttBulg ) (vl-load-com) (defun rlw (LW / E X1 X2 X3 X4 X5 X6) ;; by ElpanovEvgeniy ;; reverse lwpolyline (if (= (cdr (assoc 0 (setq e (entget lw)))) "LWPOLYLINE") (progn (foreach a1 e (cond ((= (car a1) 10) (setq x2 (cons a1 x2))) ((= (car a1) 40) (setq x4 (cons (cons 41 (cdr a1)) x4))) ((= (car a1) 41) (setq x3 (cons (cons 40 (cdr a1)) x3))) ((= (car a1) 42) (setq x5 (cons (cons 42 (- (cdr a1))) x5))) ((= (car a1) 210) (setq x6 (cons a1 x6))) (t (setq x1 (cons a1 x1))) ) ) (entmod (append (reverse x1) (append (apply (function append) (apply (function mapcar) (cons 'list (list x2 (cdr (reverse (cons (car x3) (reverse x3)))) (cdr (reverse (cons (car x4) (reverse x4)))) (cdr (reverse (cons (car x5) (reverse x5)))) ) ) ) ) x6 ) ) ) (entupd lw) ) ) ) (defun AssocOn ( SearchTerm Lst func fuzz ) (car (vl-member-if (function (lambda (pair) (equal SearchTerm (apply func (list pair)) fuzz)) ) lst ) ) ) (defun ListClockwise-p ( lst / z vlst ) (vl-catch-all-apply 'minusp (list (if (not (equal 0.0 (setq z (apply '+ (mapcar (function (lambda (u v) (- (* (car u) (cadr v)) (* (car v) (cadr u))) ) ) (setq vlst (mapcar (function (lambda (a b) (mapcar '- b a)) ) (mapcar (function (lambda (x) (car lst))) lst) (cdr (reverse (cons (car lst) (reverse lst)))) ) ) (cdr (reverse (cons (car vlst) (reverse vlst)))) ) ) ) 1e-6 ) ) z (progn (prompt "\n\nChecked vectors are colinear - unable to determine clockwise-p of list") nil ) ) ) ) ) (defun MR:GetVertices ( e / l ) (if e (setq l (mapcar 'cdr (vl-remove-if-not '(lambda (x) (eq (car x) 10)) (entget e)))) ) ) (defun MR:GetBulge ( e / l ) (if e (setq l (mapcar 'cdr (vl-remove-if-not '(lambda (x) (eq (car x) 42)) (entget e)))) ) ) (defun _intl (l1 l2 / ll1 ll2 a ls1 ls2) (setq ll1 l1 ll2 l2 ) (while (setq a (car ll2)) (while ll1 (if (equal a (car ll1) 1e-6) (setq ls1 (append ls1 (list a)) ll1 (cdr ll1) ) (setq ll1 (cdr ll1)) ) ) (setq ll2 (cdr ll2) ll1 (vl-remove a l1) ) ) (setq ll1 l1 ll2 l2 ) (while (setq a (car ll1)) (while ll2 (if (equal a (car ll2) 1e-6) (setq ls2 (append ls2 (list a)) ll2 (cdr ll2) ) (setq ll2 (cdr ll2)) ) ) (setq ll1 (cdr ll1) ll2 (vl-remove a l2) ) ) (if (< (length ls1) (length ls2)) ls1 ls2) ) (defun prelst ( lst el / f ) (vl-remove-if '(lambda ( a ) (or f (setq f (equal a el 1e-6)))) lst) ) (defun suflst ( lst el ) (cdr (vl-member-if '(lambda ( a ) (equal a el 1e-6)) lst)) ) (defun _Buildlist ( sp lst ) (append (list sp) (suflst lst sp) (prelst lst sp)) ) (setq sp (getpoint "\nSelect Start Point:")) (setq ep (getpoint sp "\nSelect End Point:")) (setq ss (ssget (list '(0 . "*POLYLINE") '(-4 . "<or") '(70 . 0) '(70 . 1) '(70 . 128) '(70 . 129) '(-4 . "or>") (cons 410 (if (= 1 (getvar 'cvport)) (getvar 'ctab) "Model"))))) (progn (initget 1 "T B") (setq opt (getkword "\nSelect option [Top/Bottom]: ")) ) (setq pl (car (nentselp sp))) (setq sp (trans sp 1 pl) ep (trans ep 1 pl)) (while (>= (sslength ss) 1) (if (eq (cdr (assoc 0 (entget pl))) "POLYLINE") (progn (setq hpllst (cons pl hpllst)) (command "_.convertpoly" "l" pl "") (entupd pl) ) ) (if (eq opt "T") (if (not (ListClockwise-p (MR:GetVertices pl))) (progn (setq rpllst (cons pl rpllst)) (rlw pl) ) ) (if (ListClockwise-p (MR:GetVertices pl)) (progn (setq rpllst (cons pl rpllst)) (rlw pl) ) ) ) (setq a (MR:GetVertices pl)) (setq b (MR:GetBulge pl)) (if (eq opt "T") (if (ListClockwise-p a) (setq ab (mapcar '(lambda (x y) (cons x y)) a b)) (setq a (reverse a) b (reverse (mapcar '(lambda (x) (* (- 1.0) x)) b)) bb (cdr b) b (append bb (list (car b))) ab (mapcar '(lambda (x y) (cons x y)) a b)) ) (if (ListClockwise-p a) (setq a (reverse a) b (reverse (mapcar '(lambda (x) (* (- 1.0) x)) b)) bb (cdr b) b (append bb (list (car b))) ab (mapcar '(lambda (x y) (cons x y)) a b)) (setq ab (mapcar '(lambda (x y) (cons x y)) a b)) ) ) (setq lst (cons a lst) lstab (cons ab lstab)) (ssdel pl ss) (repeat (setq i (sslength ss)) (setq ent (ssname ss (setq i (1- i)))) (if (not (vl-catch-all-error-p (vl-catch-all-apply 'vlax-safearray->list (list (vl-catch-all-apply 'vlax-variant-value (list (vla-intersectwith (vlax-ename->vla-object pl) (vlax-ename->vla-object ent) AcExtendNone))))))) (setq pll ent) ) ) (if pll (setq pl pll)) ) (setq i -1 loop t) (setq lst (reverse lst) lstab (reverse lstab)) (if (and (cdr (reverse lst)) (cdr (reverse lstab))) (setq lst (append lst (cdr (reverse lst))) lstab (append lstab (cdr (reverse lstab)))) ) (while loop (setq i (1+ i)) (setq Pls (_Buildlist (setq sp (list (car sp) (cadr sp))) (nth i lst))) (foreach pt Pls (setq Bls (cons (assocon pt (nth i lstab) 'car 1e-6) Bls)) ) (setq Bls (reverse Bls)) (if (nth (1+ i) lst) (if (vl-member-if '(lambda (x) (equal (list (car ep) (cadr ep)) x 1e-6)) (if (/= i (atoi (rtos (/ (length lst) 2.0)))) (prelst Pls (car (_intl Pls (nth (1+ i) lst)))) (if (equal (nth i lst) (last lst)) (last lst) (prelst Pls (last (_intl Pls (nth (1+ i) lst))))))) (setq sp (list (car ep) (cadr ep)) loop nil) (if (/= i (atoi (rtos (/ (length lst) 2.0)))) (setq sp (car (_intl Pls (nth (1+ i) lst)))) (setq sp (last (_intl Pls (nth (1+ i) lst))))) ) (setq sp (list (car ep) (cadr ep)) loop nil) ) (setq Pls (prelst Pls sp)) (setq Bls (prelst Bls (assocon sp (nth i lstab) 'car 1e-6))) (setq PtlSt (append PtlSt Pls)) (setq PtBulg (append PtBulg Bls)) (setq Bls nil) ) (setq PtlSt (append PtlSt (list (list (car ep) (cadr ep))))) (setq PtBulg (append PtBulg (list (assocon (list (car ep) (cadr ep)) (reverse (apply 'append (reverse lstab))) 'car 1e-6)))) (mapcar '(lambda (x) (if (equal (cdr x) nil) (setq PttBulg (cons 0.0 PttBulg)) (setq PttBulg (cons (cdr x) PttBulg)))) PtBulg) (setq PttBulg (reverse PttBulg)) (setq PtlSt (mapcar '(lambda (x) (list (car x) (cadr x))) PtlSt)) (foreach pl rpllst (rlw pl) ) (entmake (append (list (cons 0 "LWPOLYLINE") (cons 100 "AcDbEntity") (cons 100 "AcDbPolyline") (assoc 38 (entget pl)) (cons 90 (length PtlSt)) (cons 70 (if (eq 1 (getvar 'plinegen)) 128 0 ) ) ) (apply 'append (mapcar (function (lambda ( p b ) (list (cons 10 p) (cons 42 b)))) PtlSt PttBulg)) (list (assoc 210 (entget pl))) ) ) (foreach pl hpllst (command "_.convertpoly" "h" pl "") ) (sssetfirst nil (ssadd (entlast))) (princ) ) Thanks
  4. Thanks marko_ribar , I didn't know about this code !!! is nice Thanks
  5. fuccaro

    Divide by custom property

    Put the value of ROW SPACING in the variable RS, and run this code: (list (list "Total Risers:" (strcat "%<\\AcExpr (Sum(B3:B" (itoa (setq r (+ (length (car x)) 2))) (strcat "))/" (itoa RS) " \\f \"%lu2%pr0\">%") ) ) ) It should work...
  6. Have you tried Plpath.lsp from here : https://www.cadtutor.net/forum/topic/37726-draw-polyline-along-with-2-or-more-adjacent-closed-polylines/?do=findComment&comment=442693 I think that it have option top or bottom - 2 sides, but it's not working with 3rd point... So you'll have to try and retry if it's wrong way...
  7. Is it possible to add a Specify 3nd Point to select the correct side to draw the polyline? Thanks
  8. Hi, I am trying to convert this code. This code ask to select two points of a polyline and draw a polyline on the path of the previous polyline to connect them. The problem is that this code connect the two points the most of the time, not from the side I want. I want to add somehow an option , for example Pick from the side you want to create the Polyline. Can any one help? ;PLP - Copying part of LWPolyline ;Lay y tuong tu https://www.cadtutor.net/forum/topic/77002-coping-part-of-polyline/#comment-614215 ;Copy from Lee-Mac http://lee-mac.com/offsetpolysection.html ;;------------------=={ Offset LWPolyline Section }==-------------------;; ;; ;; ;; This program prompts the user to specify an offset distance and to ;; ;; select an LWPolyline. The user is then prompted to specify two ;; ;; points on the LWPolyline enclosing the section to be offset. The ;; ;; progam will proceed to offset all segments between the two given ;; ;; points to both sides by the specified distance. ;; ;; ;; ;; The program is compatible with LWPolylines of constant or varying ;; ;; width, with straight and/or arc segments, and defined in any UCS ;; ;; construction plane. ;; ;;----------------------------------------------------------------------;; ;; Author: Lee Mac, Copyright © 2013 - www.lee-mac.com ;; ;;----------------------------------------------------------------------;; ;; Version 1.0 - 27-12-2012 ;; ;; ;; ;; First release. ;; ;;----------------------------------------------------------------------;; ;; Version 1.1 - 05-04-2013 ;; ;; ;; ;; Fixed bug when offsetting polyline arc segments. ;; ;;----------------------------------------------------------------------;; (defun c:PLP ( / d e h l m n o p q w x z elast tt) (vl-load-com) ;; Check if the layer exists, if not, create it (if (not (tblsearch "LAYER" "Poly")) (command "_layer" "_m" "Poly" "_c" "10" "" "_lw" "0.70" "" "plot" "no" "" "") ) ;Sub-Function---------------------------------------------------------------------- ;; Tangent - Lee Mac ;; Args: x - real (defun tan ( x ) (if (not (equal 0.0 (cos x) 1e-8)) (/ (sin x) (cos x)) ) ) ;; LW Vertices - Lee Mac ;; Returns a list of lists in which each sublist describes the position, ;; starting width, ending width and bulge of a vertex of an LWPolyline (defun LM:LWVertices ( e ) (if (setq e (member (assoc 10 e) e)) (cons (list (assoc 10 e) (assoc 40 e) (assoc 41 e) (assoc 42 e) ) (LM:LWVertices (cdr e)) ) ) ) ;Sub-Function---------------------------------------------------------------------- ;Main-Function--------------------------------------------------------------------- (setq PLP-Type (if (and PLP-Type (= (type PLP-Type) 'STR) (or (= PLP-Type "Entsel") (= PLP-Type "NEntsel"))) PLP-Type "Entsel")) (setq d 1 elast (entlast) tt T) (while tt (setvar 'errno 0) (initget "Entsel NEntsel") (if (= PLP-Type "Entsel") (setq e (entsel (strcat "\nEntsel. Copying part of LWPolyline. Select LWPolyline [Entsel/NEntsel]: "))) (setq e (nentsel (strcat "\nNEntsel. Copying part of LWPolyline. Select LWPolyline [Entsel/NEntsel]: ")))) (if e (progn (if (= e "Entsel")(setq PLP-Type "Entsel")) (if (= e "NEntsel")(setq PLP-Type "NEntsel")) (if (and (= (type e) 'LIST) (= (type (car e)) 'ENAME)) (progn (setq e (car e)) (sssetfirst (ssadd e (ssadd))(ssadd e (ssadd))) (cond ( (= 7 (getvar 'errno)) (princ "\nMissed, try again.") ) ( (null e) nil) ( (/= "LWPOLYLINE" (cdr (assoc 0 (entget e)))) (princ (strcat "\nObject " (cdr (assoc 0 (entget e))) " is not a LWPolyline.")) ) ( (setq p (getpoint "\nSpecify 1st Point: ")) (setq p (vlax-curve-getclosestpointto e (trans p 1 0))) (while (and (setq q (getpoint (trans p 0 1) "\nSpecify 2nd Point: ")) (equal p (setq q (vlax-curve-getclosestpointto e (trans q 1 0))) 1e-8) ) (princ "\nPoints must be distinct.") ) (if q (progn (if (> (setq m (vlax-curve-getparamatpoint e p)) (setq n (vlax-curve-getparamatpoint e q)) ) (mapcar 'set '(m n p q) (list n m q p)) ) (setq e (entget e) h (reverse (member (assoc 39 e) (reverse e))) h (subst (cons 70 (logand (cdr (assoc 70 h)) (~ 1))) (assoc 70 h) h) l (LM:LWVertices e) z (assoc 210 e) ) (repeat (fix m) (setq l (cdr l)) ) (if (not (equal m (fix m) 1e-8)) (setq x (car l) w (cdr (assoc 40 x)) l (cons (list (cons 10 (trans p 0 (cdr z))) (cons 40 (+ w (* (- m (fix m)) (- (cdr (assoc 41 x)) w)))) (assoc 41 x) (cons 42 (tan (* (- (min n (1+ (fix m))) m) (atan (cdr (assoc 42 x))) ) ) ) ) (cdr l) ) ) ) (setq l (reverse l)) (repeat (+ (length l) (fix m) (- (fix n)) -1) (setq l (cdr l)) ) (if (not (equal n (fix n) 1e-8)) (setq x (car l) w (cdr (assoc 40 x)) l (vl-list* (list (cons 10 (trans q 0 (cdr z))) '(40 . 0.0) '(41 . 0.0) '(42 . 0.0) ) (list (assoc 10 x) (assoc 40 x) (cons 41 (+ w (* (/ (- n (max m (fix n))) (- (1+ (fix n)) (max m (fix n)))) (- (cdr (assoc 41 x)) w) ) ) ) (cons 42 (tan (* (if (< (fix n) m) 1.0 (- n (fix n))) (atan (cdr (assoc 42 x))) ) ) ) ) (cdr l) ) ) ) ;; After creating the polyline (setq o (vlax-ename->vla-object (entmakex (append h (apply 'append (reverse l)) (list z))) ) ;; Set the layer of the polyline to "Poly" ) (vla-put-Layer o "Poly") ;(vl-catch-all-apply 'vla-offset (list o d)) ;(vl-catch-all-apply 'vla-offset (list o (- d))) ;(vla-delete o) ) ) ) );cond );progn );if );progn (setq tt nil));if (if (> (sslength (ssadd (entlast)(ssadd elast (ssadd)))) 1);created new pline (progn (sssetfirst (ssadd (entlast)(ssadd))(ssadd (entlast)(ssadd))) (setq tt nil))) );while (princ) );defun ;;----------------------------------------------------------------------;; ;; End of File ;; ;;----------------------------------------------------------------------;; Thanks
  9. Yesterday
  10. BIGAL

    Code for labeling swales

    I am not sure but have a sneaky feeling can add a point to a surface using the correct civ3d command via lisp. You can find the command in the CUI. Over the years there is sample code supplied with CIV3D I am not sure if add a point is there, definitely use lisp to make a surface is there. Look in Something like this there is a VL api. Lastly if you search down the CIVIL 3D 2014 directory you will find a example of how to create a TIN via a program, I will see if I can find it, something like Civil 3D API. I may have seen last in CIV3d2012. Search for c:\Autodesk\Autocad Civil3d 2014\sample\civil 3d api\com\vba\SurfaceoperationSample.dvb PS have Point label style changer.lsp for second step. Doing some more digging Check post by Hippe13 I think is answer. I have a dcl select surface even if not displayed. You may also be interested in this for CIV3D surface display uses a toolbar approach the way it should work .Chcontourstoolbar.zip
  11. A couple of different ways find the "-" using (vl-position then look at each character after it should be a "M" Then a "0 1 2 3 4 5 6 7 8 9" then check next if its also "0 1 2 3 4 5 6 7 8 9" Try this (setq str "NEN1555-M06x040E") (setq pos (+ 2 (vl-string-position 45 str))) (setq char1 (strcase (substr str pos 1))) (if (/= char1 "M") (princ "\nThe text chosen does not have a M bolt ") (progn (setq char2 (substr str (+ 1 pos) 1)) (if (or (< (ascii char2) 58)(> (ascii char2) 47)) (setq str2 (strcat char1 char2)) ) (setq char2 (substr str (+ 2 pos) 1)) (if (or (< (ascii char2) 58)(> (ascii char2) 47)) (setq str2 (strcat str2 char2)) ) ) ) ; "M06"
  12. This is the code you can add the "Lxxx" fillet reactor.lsp
  13. John Uhden responded Anyway, StripMtext was the invention of Joe Burke and Steve Doman. My contribution was very small and used only for the earliest releases.
  14. I have this line of code and for the life of me I cannot figure out how to divide by a custom drawing property called "ROW SPACING". ...other stuff (list (list "Total Risers:" (strcat "%<\\AcExpr (Sum(B3:B" (itoa (setq r (+ (length (car x)) 2))) "))/12 \\f \"%lu2%pr0\">%"))) ;;replace 12 with the drawing property "ROW SPACING" ...other stuff How would I do that? Thank you!
  15. CyberAngel

    Code for labeling swales

    Okay, I've spent part of the last week looking at Dynamo again. Apparently, the people who seriously use this package could fit into a monorail car. Autodesk created a package called Toolkit, which has a lot of handy, um, tools. A user created an entire GitHub package for Dynamo and Civil 3D called Camber. There is a node in Camber to create a surface elevation label, which solves half my problem. What's a node, you wonder? Dynamo is visual programming, so instead of functions or methods, you have nodes. (You find nodes in Blender as well.) Here's a sample: The goal is to process from left to right. The wires (tubes) transfer output from one node to input for another node. The two big nodes on the right, with all the wires running into them, are supposed to create surface elevation labels. They need a surface, a label style, and a marker style, which are picked from lists. Then you pick points and pass them both to the label nodes. There are a lot of crossed wires, but that's because I have several inputs going to multiple outputs. The top box on the right creates a 3D polyline between the two picked points and adds it to the drawing. (The Watch box just shows me the polyline when it's done--or it's supposed to. This thing doesn't quite work yet.) Once you catch on, this is definitely easier than code. You can't pass one type of output into a different type of input, so it automatically does type checking. You can see the structure of your algorithm. You don't have to worry about importing libraries. The downsides are that you have to change the way you think about getting things done, and sometimes you have to spend more time setting things up than solving the actual problem.
  16. Clint

    Flip text - lisp

    For some reason, the generous code submission has not effect on the TEXT or MTEXT in a file with the MIRRTEXT setting both as 1 or 0 (zero). I renamed Test to Fliptxt.lsp that appears to be run successfully.
  17. hello everyone, what I would like to program in lisp is the following: in the drawing I have a block (bolt) of which I want to use the name to enter another block (nut). I test for insert 0 and test for the name of the block. Because there are many lengths of, for example, an M8 bolt, the name of the block must be filtered, otherwise the correct block (nut) will not be automatically selected and placed in the drawing. see attached lisp file, with comments. (DEFUN c:nutinsert (/ A B D ) (PROGN (SETQ A (ENTSEL "\nSelect Block: ")) (IF A (PROGN ; (SETQ B (CDR (ASSOC 0 (ENTGET (CAR A))))) (IF (NOT (= B "INSERT")) (ALERT "\nselectinset is not a Block.") ) (IF (= B "INSERT") (PROGN (SETQ D (CDR (ASSOC 2 (ENTGET (CAR A))))) ;get blockname ;following are examples of bolt names, the list is much longer. I only need (IF (OR (= D "NEN1555-M08x070E") ;M8 (OR (= D "NEN1555-M06x040E")) ;M6 (OR (= D "NEN1555-M10x090E")) ;M10 (OR (= D "NEN1555-M16x100E")) ;M16 (OR (= D "NEN1568-M03x050E")) ;M3 (OR (= D "NEN1568-M08x120E")) ;M8 (OR (= D "NEN1568-M06x060E")) ;M6 (= D "NEN1555-M12x050E")) ;M12 ;I need a filter only M8 OR M6 OR M10 ECT, of the blockname. (PROGN (Setvar "Cmdecho" 0) (SETQ OLDLAYER (GETVAR "CLAYER")) (SETQ LAY (IF (NOT (TBLSEARCH "LAYER" "03_GEOMETRIE_050")) (COMMAND "LAYER" "M" "03_GEOMETRIE_050" "C" "7" "" "L" "CONTINUOUS" "" "")) ) (COMMAND "LAYER" "S" "03_GEOMETRIE_050" "") (SETQ Y (getpoint "\nGeef Invoegpunt : ")) (Command "-Insert" "NEN1560-M008-E";the BLOCK name is based on M8. ;it has to be flexible, M3 M4 M5 M6 M8 M10 ECT. Y "" "" Pause) (SETVAR "CLAYER" OLDLAYER) (PRINC) ) ) ) ) ) ) ) ) (PRINC)
  18. cadffm created a version d, it was posted in a thread on Autodesk Forum, OP posted a link to it in their other thread. HERE stripmtext-v5-0 Lisp Routine - Autodesk Community - AutoCAD
  19. ;;;n - L1 length ;;;L - list (defun BreakAtN (L n / L1 L2) (setq L2 L) (repeat n (setq L1 (cons (car L2) L1) L2 (cdr L2))) )
  20. For versions newer than 2021 you need to set the system variable LISPSYS to zero (LISPSYS=0) and restart AutoCAD for this and other older code I still use to function correctly. https://www.theswamp.org/index.php?topic=31584.msg608557#msg608557 He talked about a v5.0d version coming soon but I've never found it anywhere. He may have gotten frustrated when the code he put so much time into no longer worked as expected with AutoCAD's default settings.
  21. CyberAngel

    DXE file

    I guess it depends on which version you're using. At some point the wizard that creates your DXE file should give you the option of sorting on a column. You pick the column(s) and specify ascending or descending order. If that doesn't help, please provide more information. How are you creating the DXE file? What types of data are you extracting, and what are you doing with the data? Welcome to the forum!
  22. Select one of the layouts at the bottom of the window. You will see your paper space, possibly with a viewport included. If you don't have a viewport, use the VPORTS command to create one. Double-click in the viewport. That will put you in model space. Use the ZOOM Extents command. That should bring your linework into the center of the viewport. If you need to print to a scale, you'll have to adjust the viewport scale (one of its properties) or the size of the viewport itself or both. Once you have the viewport how you want it, plot it to your PDF plotter. The details will depend on the configuration of your system. It will take some experimentation the first time you do this. Don't be afraid to make mistakes. Welcome to the forum!
  23. There is a version 5.0d around, further down the page where you linked in your other post, it seems to address the issue. v5.0d ??cadffm?? ;;;; Revised regular expression for Height format - ;;;; e.g. for format like this: H0.400000 Also, John Uhden has an Unformat LISP he mentions in the same thread, that might do what you need. Please post your amended code if you don't mind, others may find it helpful.
  24. BIGAL, Sure! I would like to check out the reactor-based code. Make it available at your earliest convenience. Thanks, Clint
  25. If anyone wants to print a funnel for themselves, i have put both the petrol and diesel versions here: Fuel funnels.
  26. All the functions that use PEdit -> Multiple -> Join could (in my opinion) be improved by setting the fuzz to 0.0 in the code. Because if you just press enter "" after "_J" the previously used fuzz is used, which might give an undesired effect. An example of what can happen is shown in the image below. So just replace the "" after "_J" with "0.0", and the fuzz is always reset to 0: (command "_.pedit" "_m" ss "" "_j" "0.0" "")
  27. Thanks @BIGAL. Thought about that, that geometric center is not always inside polyline. Using QGIS, it also can label in center of polyline but it also have option "force point inside polygon". I'm curious about the algorithm that controls that. For me, most problem is "L" shape polylines. Thought that algorith in QGIS could be something like that it is finding geometric center or something like here in ATM code: https://jtbworld.com/autocad-areatext-lsp After finding center (geometric or like in ATM) it is finding intersection with horizontal (or vertical xlines). After that, sorting X (or Y for vertical) and find if center is before/inside/after X of intersection. After that, choose/calculate new X.
  1. Load more activity
×
×
  • Create New...