All Activity
- Past hour
-
As I have already mentioned, that LISP has too many issues. I trash canned all of my attempts, @pkenewell is correct, I had something else in there. I'll try to think about it. Every issue I tracked down, a new one came up. Just forget that LISP and start from scratch.
-
https://apps.autodesk.com/ACD/it/Detail/Index?id=8055037424722464637&appLang=en&os=Win64
-
@jim78b I don't understand what you mean. Again - if you want this program to be property troubleshooted, please provide an example drawing and a visual explanation if what you are expecting to happen.
-
@pkenewell I dont know how , when, or why but I can see the acadauto.chm to work I did a copy file from Copy and paste chm and paste to the dwg , and despite vlide show the same alert NOT FOUND , it work.
-
Sorry, but thank you for your hard work. It works now, but: I thought I had a window always open with the block list that automatically updates without me having to select anything. I'd like the window to stay open even when I'm working. If I click on a block name, it highlights in the drawing. Sorry if I wasn't specific. Thanks
-
@jim78b I also noticed on the first line, the setq statement need to be set to something. You can't just have (setq *block_name_list*). I just put "nil" below, but it seems to want a list of Block Names? ;; This global list will store the clean names for selection (setq *block_name_list* nil);<-- Needs to be set to something ALSO: If you want someone to work on this for you. I think you need to provide a sample drawing with what you want to accomplish. I don't have time to troubleshoot this by re-creating the circumstances where this program is needed.
- Today
-
@jim78b There is another one. Sorry - I did this accidentally in my earlier post on those 2 lines. I corrected my previous posts. " (sssetfirst nil nil)" ; Clear any previous selection grips
-
pkenewell started following acadauto.chm not found
-
@devitg This appears to be a Bug in VLIDE. I get the same problem. I think the interface was not updated for the current help system.
-
thanks i edit but give me again syntax error
-
@jim78b The end quote is in the wrong place on this line. See correction below. " (if ss (sssetfirst nil ss))" ;<--Quote BEFORE comment. Highlight all found instances in current space
-
;;----------------------------------------------------------------------;; ;; SNB_Select.lsp ;; ;; ;; ;; Interactively select and highlight nested blocks from a dialog. ;; ;; ;; ;; Depends on the updated `nestedblocks.dcl` file. ;; ;; ;; ;; To Run: APPLOAD -> Load File -> Type "SNB_SELECT" in the command. ;; ;;----------------------------------------------------------------------;; ;; This global list will store the clean names for selection (setq *block_name_list*) ;; Recursive function to populate the dialog list and our background list (defun FindAndListNestedBlocks (blkname level visited) (if (not (member blkname visited)) (if (tblsearch "BLOCK" blkname) (progn (setq visited (cons blkname visited)) ; Add current block to visited list (setq ent (tblobjname "BLOCK" blkname)) (setq ent (entnext ent)) (while ent (setq edata (entget ent)) (if (= "INSERT" (cdr (assoc 0 edata))) (progn (setq nested_blkname (cdr (assoc 2 edata))) (setq indent (make_string (* level 2) 32)) ;; Add the formatted name to the visible list box (add_list (strcat indent "|-- " nested_blkname)) ;; Add the clean name to our background list (setq *block_name_list* (append *block_name_list* (list nested_blkname))) ;; Recurse for the next level (FindAndListNestedBlocks nested_blkname (+ level 1) visited) ) ) (setq ent (entnext ent)) ) ) ) ) ) ;; Main command function (defun c:SNB_SELECT (/ sel edata blkname dcl_id selected_index ss) (princ "\n--- Interactive Nested Block Viewer ---") (setq sel (entsel "\nSelect a parent block to inspect: ")) (if sel (progn (setq dcl_id (load_dialog "nestedblocks.dcl")) (if (not (new_dialog "NestedBlockViewer" dcl_id)) (exit) ) (setq edata (entget (car sel))) (setq blkname (cdr (assoc 2 edata))) ;; Initialize the background list with the top-level block (setq *block_name_list* (list blkname)) ;; Populate the visible list in the dialog (start_list "block_tree") (add_list blkname) (FindAndListNestedBlocks blkname 1 nil) (end_list) ;; --- Define Actions for Dialog Buttons --- ;; 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" ")" ) ) ;; Action for the OK button (and double-clicking a list item) (action_tile "accept" "(done_dialog)") ;; Display the dialog and wait for user action (start_dialog) (sssetfirst nil nil) ; Clear selection grips on exit (unload_dialog dcl_id) ) (princ "\nNo object selected.") ) (princ) ) (princ "\nLISP loaded. Type SNB_SELECT to run.") (princ) Give me again syntax error sorry
-
Works for me here as well.
-
I placed a new LISP in my earlier post to just do a Sequential Find and Replace, see if that works for you. I am working on a bigger LISP with dialog box input and select the options, but that's going to be a while due to my workload.
-
You still haven't provided the before and after drawing or the steps you want.
-
Field update issues in dynamic block
SLW210 replied to jamami's topic in AutoCAD Drawing Management & Output
I finally got it to act as you say. I'll see if I have time a little latter to work on it. Do you still have the original with the dimension text? -
You failed to fix the very first part I told you was giving that error. It should be setq. ;; This global list will store the clean names for selection (defun-q *block_name_list*) Should be ... (setq *block_name_list*)
-
Sorry for late reply but i have problem with my internet connection. i tried to modify the lisp but give me syntax error, sorry. ;;----------------------------------------------------------------------;; ;; SNB_Select.lsp ;; ;; ;; ;; Interactively select and highlight nested blocks from a dialog. ;; ;; ;; ;; Depends on the updated `nestedblocks.dcl` file. ;; ;; ;; ;; To Run: APPLOAD -> Load File -> Type "SNB_SELECT" in the command. ;; ;;----------------------------------------------------------------------;; ;; This global list will store the clean names for selection (defun-q *block_name_list*) ;; Recursive function to populate the dialog list and our background list (defun FindAndListNestedBlocks (blkname level visited) (if (not (member blkname visited)) (if (tblsearch "BLOCK" blkname) (progn (setq visited (cons blkname visited)) ; Add current block to visited list (setq ent (tblobjname "BLOCK" blkname)) (setq ent (entnext ent)) (while ent (setq edata (entget ent)) (if (= "INSERT" (cdr (assoc 0 edata))) (progn (setq nested_blkname (cdr (assoc 2 edata))) (setq indent (make_string (* level 2) 32)) ;; Add the formatted name to the visible list box (add_list (strcat indent "|-- " nested_blkname)) ;; Add the clean name to our background list (setq *block_name_list* (append *block_name_list* (list nested_blkname))) ;; Recurse for the next level (FindAndListNestedBlocks nested_blkname (+ level 1) visited) ) ) (setq ent (entnext ent)) ) ) ) ) ) ;; Main command function (defun c:SNB_SELECT (/ sel edata blkname dcl_id selected_index ss) (princ "\n--- Interactive Nested Block Viewer ---") (setq sel (entsel "\nSelect a parent block to inspect: ")) (if sel (progn (setq dcl_id (load_dialog "nestedblocks.dcl")) (if (not (new_dialog "NestedBlockViewer" dcl_id)) (exit) ) (setq edata (entget (car sel))) (setq blkname (cdr (assoc 2 edata))) ;; Initialize the background list with the top-level block (setq *block_name_list* (list blkname)) ;; Populate the visible list in the dialog (start_list "block_tree") (add_list blkname) (FindAndListNestedBlocks blkname 1 nil) (end_list) ;; --- Define Actions for Dialog Buttons --- ;; 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" ")" ) ) ;; Action for the OK button (and double-clicking a list item) (action_tile "accept" "(done_dialog)") ;; Display the dialog and wait for user action (start_dialog) (sssetfirst nil nil) ; Clear selection grips on exit (unload_dialog dcl_id) ) (princ "\nNo object selected.") ) (princ) ) (princ "\nLISP loaded. Type SNB_SELECT to run.") (princ)
-
Field update issues in dynamic block
jamami replied to jamami's topic in AutoCAD Drawing Management & Output
Mirrtext doesn’t have any influence on dims embedded in blocks only way to stop the mirroring is to use an attribute - Yesterday
-
Field update issues in dynamic block
BIGAL replied to jamami's topic in AutoCAD Drawing Management & Output
What about MIRRTEXT variable it forces a flip mirror text. Worked as is for me Bricscad V25. -
-
devitg started following acadauto.chm not found
-
Using APROPS at VLIDE I get this alert. Please route me where it shall be . I have the file , but VLIDE did not found "C:\Program Files\Common Files\Autodesk Shared\en-US\acadauto.chm"
-
Field update issues in dynamic block
jamami replied to jamami's topic in AutoCAD Drawing Management & Output
mirror is a very common command, especially for symmetric installations of asymmetric platforms, people tend to draw one side and then simply mirror to draw the other, alternative is to copy and then rotate, but this will be bay by bay and takes a lot longer than mirroring. Have you tried :- Inserting into another drawing Stretch the length using the dyn grips, you need to then to type regen to see the correct length (another downside of field vs dim) Delete block then insert from insert menu Drag onto a pallete and then open a new drawing and drag into new drawing (this causes a recover error when I do it) its great to know it works fine for you as none of us here find it stable . When I evaluate the formulae it responds with nonsensical data, see images attached. -
I gave this a try and I don't know if maybe I'm doing something wrong but it gave me something weird. It changed the end of the 1st line but it just gave me 0's instead of renumbering and then on the two middle mleaders it removed the "D" at the end of strand. Thanks for your help with this, really appreciate it!
-
Field update issues in dynamic block
SLW210 replied to jamami's topic in AutoCAD Drawing Management & Output
Why do you need to mirror? It works fine for me, even mirrored, you just have to RegenALL to get the new value. You could add a flip to the block. -
You got lucky, stopped at work waiting on more information. I lightly tested this on your drawings. ;;; Sequential Numbering added to MLeader, Mtext and Text with Find and Replace. *| ;;; *| ;;; https://www.cadtutor.net/forum/topic/26420-tcount-in-a-multileader/#comment-648519 *| ;;; *| ;;; With help from: https://forums.augi.com/showthread.php?117315-Modify-text-in-multileader *| ;;; *| ;;; By SLW210 (Steve Wilson) *| ;;; *| ;;; No guarantees use at your own risk *| ;;; *| ;;; Original 07/29/2025 *| ;;; *| ;;; *| ;;; Thanks most to AlanJT, lpseifert and irneb (Where have y'all gone?) *| ;;; *| ;;;************************************************************************************************| ;;;************************************************************************************************| ;;; When asked for FIND/REPLACE, leave blank to skip. *| ;;; *| ;;; For MTEXT/MLEADER, enter All to apply the change to all lines, or specify a line number. *| ;;; *| ;;;************************************************************************************************| ;;;************************************************************************************************| (vl-load-com) (defun c:FnRSeq () (c:FindReplaceLineSeq)) ; Shortcut command (defun c:FindReplaceLineSeq (/ ss ent en_obj current_text entType findStr replaceBase lineNum lineNumStr lineList newLines idx replNum newVal i ) ;; Prompt for find text (setq findStr (getstring T "\nEnter FIND text: ")) (if (= findStr "") (progn (princ "\nFIND string cannot be empty.") (exit)) ) ;; Starting replacement number (setq replaceBase (getstring T "\nEnter starting REPLACE number (e.g. 01): " ) ) (if (not (numberp (read replaceBase))) (progn (princ "\nInvalid number. Exiting.") (exit)) ) ;; Prompt for line number (initget 1 "All") (setq lineNumStr (getstring "\nEnter line number for MTEXT/Multileader (or type 'All'): " ) ) (setq lineNum (if (wcmatch (strcase lineNumStr) "ALL") nil (atoi lineNumStr) ) ) ;; Get selection set (setq ss (ssget '((0 . "TEXT,MTEXT,MULTILEADER")))) (if (not ss) (progn (princ "\nNo valid text entities selected.") (exit)) ) ;; Initialize replacement counter (setq replNum (atoi replaceBase)) (setq idx 0) ;; Process each selected entity (repeat (sslength ss) (setq ent (ssname ss idx)) (setq en_obj (vlax-ename->vla-object ent)) (setq entType (cdr (assoc 0 (entget ent)))) (setq current_text (vla-get-TextString en_obj)) (setq newVal (strcat (substr "0000000000" 1 (- (strlen replaceBase) (strlen (itoa replNum))) ) (itoa replNum) ) ) ;; Process by entity type (cond ;; Plain TEXT ((= entType "TEXT") (vla-put-TextString en_obj (vl-string-subst newVal findStr current_text) ) ) ;; MTEXT or MULTILEADER ((or (= entType "MTEXT") (= entType "MULTILEADER")) (setq lineList (split-text-lines current_text)) (setq i -1) (setq newLines (mapcar (function (lambda (line) (setq i (1+ i)) (if (or (null lineNum) (= i (1- lineNum))) (vl-string-subst newVal findStr line) line ) ) ) lineList ) ) (vla-put-TextString en_obj (join-lines newLines "\\P")) ) ) ;; Increment counter and index (setq replNum (1+ replNum)) (setq idx (1+ idx)) ) (princ "\nSequential find & replace completed.") (princ) ) ;;;*************************| ;;; Functions | ;;;*************************| (defun split-text-lines (txt) (vl-remove-if 'null (parse txt "\\P")) ) (defun parse (str delim / result pos start) (setq start 1 result '() ) (while (setq pos (vl-string-search delim str (1- start))) (setq result (cons (substr str start (- pos start -1)) result)) (setq start (+ pos (strlen delim) 1)) ) (reverse (cons (substr str start) result)) ) (defun join-lines (lst sep) (if (null lst) "" (apply 'strcat (cons (car lst) (mapcar (function (lambda (s) (strcat sep s))) (cdr lst)) ) ) ) ) This LISP just does a Find and Replace Sequentially no Prefix/Suffix.