All Activity
- Past hour
-
Field update issues in dynamic block
jamami replied to jamami's topic in AutoCAD Drawing Management & Output
the attached video shows the issue we are experiencing. selecting 'Evaluate' on the Field formula box blows up the expression :- {\urtf1\ansi\ansicpg65001\deff0\deflang2057{\fonttbl{\f0\fnil\fcharset0 MS Shell Dlg 2;}} \viewkind4\uc1\pard\f0\fs17\{\\urtf1\\ansi\\ansicpg65001\\deff0\\deflang2057\{\\fonttbl\{\\f0\\fnil\\fcharset0 MS Shell Dlg 2;\}\}\par \{\\colortbl ;\\red190\\green190\\blue190;\}\par \\uc1\\pard\\f0\\fs17 250+\\highlight1\\kerning1\\protect 2250\}} Video Project 1.mp4 -
leonucadomi started following increase or decrease value of attdef...help
-
increase or decrease value of attdef...help
leonucadomi posted a topic in AutoLISP, Visual LISP & DCL
hello: Now I find myself in another situation. I have an attdef group I would like to be able to make a selection in a window and that the numbering is increased or decreased by a desired amount. maintaining the numbering format with zeros examplse (001,020,999) example: any help you can provide, thanks. Drawing2.dwg - Today
-
Field update issues in dynamic block
jamami replied to jamami's topic in AutoCAD Drawing Management & Output
it is an issue on a few machines here in the office. I saw a post on autodesk forum suggesting it was UTF-8 coding setting in windows regional settings, I have tried changing this but it has had no effect. Block attached with both field and dim variants _d-spans.dwg -
@jim78b Have you tried the Autodesk Design Center? You can drill into drawings and pull out blocks, layers, etc.. You can use a short program to pull up design center in the folder you want - something like: ;;-------------------------------------------------------- ;; Command: (C:DSN) ;; Description: ;; This Command Starts the AutoCAD Design Center window ;; in the path specified. ;;-------------------------------------------------------- (defun c:DSN ( / usrpath) (setq usrpath "C:\\MyBlocks");<--CHANGE TO YOUR PREFFERED LOCATION. (if (= (getvar "adcstate") 0) (if usrpath (command "._adcnavigate" usrpath)) (command "._adcclose") ) (princ) ) ;; End Command "DSN"
-
@jim78b You cannot make an AutoLISP or Visual LISP program have a modeless interface like your example unless you use a third party add-on called OpenDCL or another called ObjectDCL. Using those is also very advanced programming. Otherwise, DCL in AutoLISP can only make simple Modal dialogs (meaning you can't work in the graphics editor when they are displayed).
-
Field update issues in dynamic block
SLW210 replied to jamami's topic in AutoCAD Drawing Management & Output
Your Field inside your Formula needs an object selected. I just picked the top line and it works for me. Not sure if that works for the correct value, so you may need something else to pick. _d-spans fixed.dwg -
ok you are the best thanks for your time and support!
-
I am waiting for IT to install some things including updates for Visual Studio, when that gets done, I'll look into writing something better. The LISP that was posted in your other thread was a better start than this.
-
Ok for now thanks, I thought it was much simpler. Thanks a lot
-
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. Yes, I had nil there. 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.
-
@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*)