Jump to content

All Activity

This stream auto-updates

  1. Past hour
  2. rsdonna

    TCOUNT for multileaders

    This is great. Is there a way to have it still do this if there are multiple lines of text in the mleader? I still have the wire name at the top line always but sometimes add 1 or 2 additional lines with other info about that wire. Thanks for your help. SAMPLE.dwg
  3. SLW210

    nestedblock window

    I forgot to post the fix. (setq *block_name_list*) I don't recall the second error.
  4. Today
  5. SLW210

    TCOUNT for multileaders

    Did you try the codes in the thread I posted?
  6. AFAIK, to plot a Layout with Hidden Visual Style, you need the viewport setup. I couldn't find the article, but I did find THIS POST. If that doesn't work, I'll have a look when I get back to work.
  7. Yesterday
  8. BIGAL

    TCOUNT for multileaders

    Give this a try, also it replaces what ever is the last 2 characters. Call it version 1. ; https://www.cadtutor.net/forum/topic/98622-tcount-for-multileaders/ ; change mleader text add number on end. ; By alanH jultu 2025 (defun c:wow1 ( / num str newstr obj len) (setq num (getint "\nEnter start number ")) (while (setq ent (entsel "\nPick Mleader - Enter to stop. ")) (setq obj (vlax-ename->vla-object (car ent))) (setq str (vlax-get obj 'textstring)) (setq len (strlen str)) (if (< num 10) (setq newstr (strcat (substr str 1 (- len 2)) "0" (rtos num 2 0))) (setq newstr (strcat (substr str 1 (- len 2)) (rtos num 2 0))) ) (vlax-put obj 'textstring newstr) (setq num (1+ num)) ) (princ) )
  9. pergolaPanels.dwg Attached.
  10. rsdonna

    TCOUNT for multileaders

    Sure, here is a sample of what I'll have in my drawings. In my drawings I'll have maybe 50 mleaders like these and I'm looking for a way to be able to pick them in order and then have it replace the -00 at the end with the sequential numbering. In TCOUNT I can pick what number I want it to start from and what the increment will be and then whether I want to overwrite, find and replace (which is what I need it to do), and also a prefix and a suffix option to place the text. Thanks for your help SAMPLE.dwg
  11. devitg

    TCOUNT for multileaders

    @rsdonna Ok , please upload your sample.dwg where you need to apply.
  12. Maybe upload the .dwg and some images of your plot settings.
  13. SLW210

    TCOUNT for multileaders

    Try something in this thread.
  14. SLW210

    nestedblock window

    It has more issues than Time magazine. Probably better rewriting something from scratch. I fixed the first 2 issues that came up, then there were more after that and I ran out of spare time to work on it. ;; This global list will store the clean names for selection (defun-q *block_name_list*) Was the error you mentioned. Once fixed more came up.
  15. Last week
  16. (setq plent (entsel "\nPick pline near end "))) (setq pt (cadr plent)) (setq co-ord (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entget (car plent))))) (setq obj (vlax-ename->vla-object plent)) (setq pt1 (vlax-curve-getstartPoint obj)) (setq pt2 (vlax-curve-getendPoint obj)) (setq d1 (distance pt pt1)) (setq d2 (distance pt pt2)) (if (> d1 d2)d (setq co-ord (reverse co-ord)) ) To reverse direction of a line or pline, "It is a task that takes 5 seconds." No its instant.
  17. pkenewell

    nestedblock window

    Yes - replace the following section of your code with my replacement. REPLACE THIS (action_tile "highlight" "(progn (setq selected_index (atoi (get_tile \"block_tree\"))) (setq selected_block (nth selected_index *block_name_list*)) (princ (strcat \"\nHighlighting all instances of: \" selected_block)) (sssetfirst nil nil) ; Clear any previous selection grips (setq ss (ssget \"_X\" (list (cons 0 \"INSERT\") (cons 2 selected_block) (cons 410 (getvar 'ctab))))) (if ss (sssetfirst nil ss)) ; Highlight all found instances in current space )" ) WITH THIS (action_tile "highlight" (strcat "(progn" " (setq selected_index (atoi (get_tile \"block_tree\")))" " (setq selected_block (nth selected_index *block_name_list*))" " (princ (strcat \"\nHighlighting all instances of: \" selected_block))" " (sssetfirst nil nil) ; Clear any previous selection grips" " (setq ss (ssget \"_X\" (list (cons 0 \"INSERT\") (cons 2 selected_block) (cons 410 (getvar 'ctab)))))" " (if ss (sssetfirst nil ss)) ; Highlight all found instances in current space" ")" ) ) The DCL and the LISP file must both be in an AutoCAD support path.
  18. jim78b

    nestedblock window

    But the dcl and lisp files must be in the same directory ?
  19. jim78b

    nestedblock window

    So i Will Copy your code in my lisp ?
  20. rsdonna

    TCOUNT for multileaders

    I don't have a TCOUNT lisp. TCOUNT is part of the express tools in AutoCAD. It's what I use when I'm going to renumber text or mtext. Unfortunately TCOUNT doesn't work in mleaders so I'm looking for a way to be able to do with mleaders what I do for text and mtext.
  21. devitg

    TCOUNT for multileaders

    @rsdonna, please upload your sample.dwg and the TCOUNT lisp
  22. pkenewell

    nestedblock window

    @jim78b Then you should've just said that. Anyway - I think the problem is that you can't have a multi-line string like in your action tile statement, when there are parenthesis and other embedded code. Do this instead: ;; Action for the "Highlight Selection" button (action_tile "highlight" (strcat "(progn" " (setq selected_index (atoi (get_tile \"block_tree\")))" " (setq selected_block (nth selected_index *block_name_list*))" " (princ (strcat \"\nHighlighting all instances of: \" selected_block))" " (sssetfirst nil nil) ; Clear any previous selection grips" " (setq ss (ssget \"_X\" (list (cons 0 \"INSERT\") (cons 2 selected_block) (cons 410 (getvar 'ctab)))))" " (if ss (sssetfirst nil ss)) ; Highlight all found instances in current space" ")" ) )
  23. I'm looking for a lisp that will allow me to do the exact same thing I do with TCOUNT but for multileaders. I have a drawing where I have mleaders going to many different lines and each has three lines of text. The first line has cable id and I want to be able to replace the last two characters of that line. In TCOUNT I would select each mtext object in order, have the count start at 1 and increase by 1 (1,1) and then I would have it find and replace the '0' I left at the end of each line with the sequential numbers created by TCOUNT. This is what I need to be able to do but on all the mleaders I have in this drawing. Anyone have something like this?
  24. jim78b

    nestedblock window

    Ai
  25. The accepted solution on that article is what I tried to do, although on MY properties pane, it doesn't allow me to change that visual style; it's locked. That's my problem. Why is it locked? Why can't I change it? How do I fix it? It's a dilemma.
  26. pkenewell

    nestedblock window

    Because no credit was given to the Author in the code or your post.
  27. pkenewell

    closed polyline with automatic hatch

    @masterfal First Check the HPLAYER and other HP... variables. These will make a hatch on a particular layer and other specifications regardless of what layer is set current. You have to set HPLAYER to blank (type in a "." for the setting). Look up HPLAYER in your help and it will explain. You can also set HPLAYER to the layer you want in code using (setvar "HPLAYER" "MyLayer")
  28. jim78b

    nestedblock window

    sorry why?
  29. I moved your thread to the AutoCAD Drawing Management & Output Forum. Try this solution... Solved: PLOTTING A VIEW OF 3D MODEL, HIDDEN VISUAL STYLE PLOTS IN COLOR - Autodesk Community
  1. Load more activity
×
×
  • Create New...