All Activity
- Past hour
-
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
-
I forgot to post the fix. (setq *block_name_list*) I don't recall the second error.
- Today
-
Did you try the codes in the thread I posted?
-
Visual Style Locked in Paper Space
SLW210 replied to Beeftimer's topic in AutoCAD Drawing Management & Output
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. - Yesterday
-
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) )
-
Visual Style Locked in Paper Space
Beeftimer replied to Beeftimer's topic in AutoCAD Drawing Management & Output
-
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
-
@rsdonna Ok , please upload your sample.dwg where you need to apply.
-
Visual Style Locked in Paper Space
SLW210 replied to Beeftimer's topic in AutoCAD Drawing Management & Output
Maybe upload the .dwg and some images of your plot settings. -
Try something in this thread.
-
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.
- Last week
-
Copy blocks to curve according to another curve
BIGAL replied to HypnoS's topic in AutoLISP, Visual LISP & DCL
(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.- 21 replies
-
- autolisp
- block position
-
(and 3 more)
Tagged with:
-
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.
-
But the dcl and lisp files must be in the same directory ?
-
So i Will Copy your code in my lisp ?
-
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.
-
devitg started following TCOUNT for multileaders
-
@rsdonna, please upload your sample.dwg and the TCOUNT lisp
-
@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" ")" ) )
-
rsdonna started following TCOUNT for multileaders
-
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?
-
tantbd44 started following ronjonp
-
Visual Style Locked in Paper Space
Beeftimer replied to Beeftimer's topic in AutoCAD Drawing Management & Output
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. -
pkenewell started following nestedblock window
-
Because no credit was given to the Author in the code or your post.
-
closed polyline with automatic hatch
pkenewell replied to james9710's topic in AutoLISP, Visual LISP & DCL
@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") -
sorry why?
-
Visual Style Locked in Paper Space
SLW210 replied to Beeftimer's topic in AutoCAD Drawing Management & Output
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