Jump to content

All Activity

This stream auto-updates

  1. Today
  2. oddssatisfy

    Display / Printing Issue

    Type GRAPHICSCONFIG → Enter → Advanced Settings → uncheck “Fade inactive geometry” (or slide it to 0%) → Apply → OK. That’s it. Your prints will instantly look exactly like they did in AutoCAD 2022 – no more extra faint lines.
  3. Yesterday
  4. Lee Mac

    Export mtext to Excel

    You're missing the double backslash ("*\\P*") Also, note that the use of vl-string-subst with a constant starting position and wcmatch to test the content is dangerous in general as this will result in an infinite loop if the replacement string contains the find string, e.g. consider replacing "new" with "knew" - your code would loop indefinitely.
  5. Is it exporting to Excel direct or are you using the CSV ? I have a libre Calc output as well.
  6. BIGAL

    Export mtext to Excel

    Thanks everyone, the answer sometimes is just looking at you and waving back. Need to double check help in future. (while (wcmatch txt "*\P*") (setq txt (vl-string-subst "\n" "\\P" txt 1)) ) Screen Recording 2025-11-24 093452.mp4
  7. I'm in need of assistance with the AutoCAD advanced functions project. I have tried but project is not making sense can you please help? Thanks,
  8. Why don't you upload your program here.(rogramınızı buraya yükler misiniz?)
  9. Lee Mac

    Export mtext to Excel

    Per the documentation, (vl-string-translate) replaces by character, not by string. Hence, for the arguments you have specified, the backslash ("\\") will be replaced by the newline character ("\n") and the "P" does not have a replacement character. Instead, since you're looking to substitute one string for another, you should use the (vl-string-subst) function (in a loop so as to replace all occurrences). I have written a String Subst wrapper which you could call in the following way: (LM:stringsubst "\n" "\\P" "Abcdef\\Pghijk\\Plmnop")
  10. oddssatisfy

    Best Practices for Setting Up a Podcast Studio

    thanks in advance for any help
  11. Hi everyone, I’m planning to set up a podcast studio at home and would love some advice. I’m trying to figure out the right combination of microphones, acoustic treatment, and software to get professional-sounding recordings. Additionally, I’m curious about workflows that make editing smoother. For example, how do you efficiently integrate post-production services into your process without it becoming too costly or time-consuming? Any recommendations on tools, equipment, or tips for both beginners and experienced podcasters would be hugely appreciated.
  12. Danielm103

    Export mtext to Excel

    You can build a lisp function in Python that will explode the MText into fragments @Ap.Command() def doit(): try: ps, id, pnt = Ed.Editor.entSel("\nSelect: ", Db.MText.desc()) mt = Db.MText(id) frags = mt.getFragments() val = "" for frag in frags: val += ' ' val += frag[Db.MTextFragmentType.kTextValue] print(frags) print(val) except Exception: print(traceback.format_exc()) [PyGe.Point3d(18.25565516926225,16.52816695203355,0.00000000000000), PyGe.Vector3d(0.00000000000000,0.00000000000000,1.00000000000000), PyGe.Vector3d(1.00000000000000,0.00000000000000,0.00000000000000), 'Hello', None, None, PyGe.Point2d(0.63669849931787,0.20327421555252), 0.2, 1.0, 0.0, 1.0, <PyDb.EntityColor object at 0x000001AD0C1D0F90>, 0, 0, 0, 0, 0, [PyGe.Point3d(0.00000000000000,0.00000000000000,0.00000000000000), PyGe.Point3d(0.00000000000000,0.00000000000000,0.00000000000000)], [PyGe.Point3d(0.00000000000000,0.00000000000000,0.00000000000000), PyGe.Point3d(0.00000000000000,0.00000000000000,0.00000000000000)], [PyGe.Point3d(0.00000000000000,0.00000000000000,0.00000000000000), PyGe.Point3d(0.00000000000000,0.00000000000000,0.00000000000000)], 'Arial', False, False] [PyGe.Point3d(19.29427328818596,15.86150028536689,0.00000000000000), PyGe.Vector3d(0.00000000000000,0.00000000000000,1.00000000000000), PyGe.Vector3d(1.00000000000000,0.00000000000000,0.00000000000000), 'World', None, None, PyGe.Point2d(0.72960436562074,0.20327421555252), 0.2, 1.0, 0.0, 1.0, <PyDb.EntityColor object at 0x000001AD0C1D1770>, 0, 0, 0, 0, 0, [PyGe.Point3d(0.00000000000000,0.00000000000000,0.00000000000000), PyGe.Point3d(0.00000000000000,0.00000000000000,0.00000000000000)], [PyGe.Point3d(0.00000000000000,0.00000000000000,0.00000000000000), PyGe.Point3d(0.00000000000000,0.00000000000000,0.00000000000000)], [PyGe.Point3d(0.00000000000000,0.00000000000000,0.00000000000000), PyGe.Point3d(0.00000000000000,0.00000000000000,0.00000000000000)], 'Arial', False, False] Hello World
  13. rlx

    Export mtext to Excel

    (defun c:t1 ( / txt1 delimiter txt2 ) (setq txt1 "Abcdef\\Pghijk\\Plmnop") (setq delimiter "\\P") (setq txt2 (pjk-Strparse txt1 delimiter)) (princ (strcat "\ntxt2 = " (vl-prin1-to-string txt2))) (princ) ) ;;; https://www.cadtutor.net/forum/topic/95913-replace-p-in-a-variable/ ;|============================================================================== Function Name: (pjk-StrParse) Arguments: str = String; String to process del = String; Delimiter to separate the string Usage: (pjk-StrParse <string> <delimter>) Returns: List; A list of strings Description: Separates a string into a list of strings using a specified delimiter string; uses recursion. ================================================================================|; (defun pjk-StrParse (str del / pos) (if (and str del) (if (setq pos (vl-string-search del str)) (cons (substr str 1 pos) (pjk-StrParse (substr str (+ pos 1 (strlen del))) del)) (list str) ) ) ) ;; End Function (pjk-StrParse)
  14. I am going around in circle and not sure why. I have a Mtext a simple 3 line Mtext (setq txt "Abcdef\\Pghijk\\Plmnop") desired text for Excel a multi line cell "Abcdef\nghijk\nlmnop" thought something like this should work. Tried all sorts of combinations. Note a dbl \\ will leave the P behind but get multi lines. (setq txt (vl-string-translate "\\P" "\n" txt)) I have all the other code done putting all the object values int Excel cells. Think Dataextract.
  15. Last week
  16. In this part of the code, only the steps on the direction curve are calculated, the intersections are generated in the mssln:line subfunction. There is a problem. I found out that if I adjust z coordinate of the normal vector from 0.0 to 1e-8, I get acceptable results. But mysteriously that doesn't work if the boundary is an arc.
  17. Hi everyone, I’ve been working on a project to automate the tedious process of room quantity takeoffs (Area & Perimeter) in AutoCAD. I know how time-consuming it can be to manually measure every room and transfer data to Excel, so I developed a Lisp plugin called Quantity Surveyor Pro. It's currently v1.0 and completely free for the community. Key Features: ☻Auto-Boundary Detection: Works like the 'Boundary' command but smarter. ☻Smart Tagging: Automatically places Room Name/No tags with area & perimeter. ☻Excel Export: Exports all data to a CSV/Excel file with one click. ☻Table Generation: Creates a summary table inside AutoCAD. I would really appreciate it if you could test it and give me some feedback on how to improve it further. You can download it here: https://cadlisp.com (It supports both English and Turkish languages) Thanks in advance for your support!
  18. I know this query is old, but... Maybe for the path to multiple locations use the Traveling Salesman Problem (TSP) algorithm. @marko_ribar has a LISP on CADTutor. Bellman-Ford algorithm can handle the shortest path from a single source to all other nodes might work.
  19. I have one in C++ wrapped for lisp https://www.theswamp.org/index.php?topic=58049.msg613033#msg613033 I’d have to look at the code again, I forgot, I think I generated a tin, from the tin, create a graph of the triangle edges
  20. BIGAL

    Curb offset

    @alanjt are you still using civ3d2013 ? I have for a few years now used Civil Site Design running under CIV3D and Bricscad, it has some great road designing tools, when you define the road shape and do a design the kerbs can then be drawn into the plan, this includes where intersections are involved the kerbs being drawn automatically around the curves. Plus of course wandering kerb lines. Maybe have a look.
  21. I think this is an extremely interesting problem that deserves significantly more lines of code than have been written so far in this thread. I believe those lines shouldn't be long in coming.
  22. @GLAVCVS Thank you very much, but you only need to choose the "stretched" dimensions. If you choose the usual dimensions, they may change. Yes, associativity can be left on. (defun c:DimAlignExtLine ( / ss e le n) (vl-load-com) (prompt "\nSelect the dimensions for alignment: ") (setq ss (ssget '((0 . "DIMENSION")))) (if ss (progn (while (setq e (ssname ss (setq n (if n (1+ n) 0)))) (setq le (entget e)) (entmod (subst (list 14 (cadr (assoc 13 le)) (caddr (assoc 14 (entget e))) 0.0) (assoc 14 le) le)) ) ) ) (princ) )
  23. Do you really need to disassociate the dimension? If you don't need to for another reason, you can delete that part of the code.
  24. (defun c:DimAssOf ( / ss e le n) (vl-load-com) (prompt "\nSelect DIMENSION to disable associativity: ") (setq ss (ssget '((0 . "DIMENSION")))) (if ss (progn (command "_.DIMDISASSOCIATE" ss "") (prompt (strcat "\nDone: associativity is disabled for " (itoa (sslength ss)) " dimensions." ) ) (while (setq e (ssname ss (setq n (if n (1+ n) 0)))) (setq le (entget e)) (entmod (subst (list 14 (cadr (assoc 13 le)) (caddr (assoc 14 (entget e))) 0.0) (assoc 14 le) le)) ) ) ) (princ) )
  25. Sharing These two VBA macros I made to help with updating tables in Solidworks. As you can use formulas to fill out or update information in excel quickly. They are both called from the Solidworks side. Export from SW to Excel Checks for a Selected table in Solidworks Checks for excel Activeworkbook Checks Activeworkbook name against list of workbooks not to export to Will exit if match Will prompt the user if any data will be overwritten in Activeworkbook Each cell format is changed to text before output so excel doesn't overwrite numbers with leading 0's or other things. Else just outputs to active workbook with Autofit Import to SW from Excel Checks for Excel Activeworkbook Takes Activeworkbook Selection and Imports to a Solid Works drawing on the right side outside of Paper Space. Zoom to fit after import. Have to move the table to import another selection or they will be on top of each other. what is seen excel is whats transferred. (no formulas or calculated values) (cell has a number that has 4 decimal place 10.1234 but is only showing two 10.12) 10.12 is what is sent to Solid Works Export.swp Import.swp
  26. CyberAngel

    Trying to adjust point marker location

    I can get the marker location using your code, BigAL, but I can't set it. The closest I came up with is this statement: (vlax-put-property obj "Location" (vlax-3d-point <northing> <easting> <elevation>)) but I get error: Automation Error. The parameter is incorrect. I see that a lot doing VLA code. Maybe there's another step to get the right variant format?
  27. The blue dimension should become the same as the red one.
  1. Load more activity
×
×
  • Create New...