Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/12/2026 in Posts

  1. Dictionary is an object in the drawing file. (setq mainDict (namedobjdict)) (dictadd mainDict "PART001" ;this is they unique key (entmakex '((0 . "XRECORD") ;needed (100 . "AcDbXrecord") ;needed (1 . "Steel") (2 . "Description") (3 . "12.5") (4 . "24") (5 . "100") (6 . "Black") ) ) ) (setq color (cdr (assoc 6 (dictsearch Maindict "PART001")))) So the main "list" or Dictionary is mainDict you then need a key to store the sub list under "PART001" and then as many dotted pairs as you want. dictsearch would be alot faster than assoc with 20,000 list.
    1 point
  2. To select multiple objects, use **`ssget`** instead of `entsel`, and then apply `setpropertyvalue` to each selected object in a loop. Select several objects using a frame, or one at a time. For all selected objects, the **Annotative** property will change to **No**. The filter allows you to select: `TEXT`, `MTEXT', `DIMENSION`, `MULTILEADER` **Objects are not deleted or recreated.** Only the `Annotative` property is changed. ; "Annotative" 0 /No/ (defun c:NoAnno (/ ss i) ; AI ;; (if (setq ss (ssget '((0 . "TEXT,MTEXT,DIMENSION,MULTILEADER")))) (if (setq ss (ssget "_:L" '((0 . "TEXT,MTEXT,DIMENSION,MULTILEADER")))) ; remark of Paul Li (progn (setq i 0) (repeat (sslength ss) (setpropertyvalue (ssname ss i) "Annotative" 0) (setq i (1+ i)) ) (princ (strcat "\nProcessed objects: " (itoa i))) ) ) (princ) ) ; "Annotative" 1 /Yes/ (defun c:YesAnno (/ ss i) ; AI ;; (if (setq ss (ssget '((0 . "TEXT,MTEXT,DIMENSION,MULTILEADER")))) (if (setq ss (ssget "_:L" '((0 . "TEXT,MTEXT,DIMENSION,MULTILEADER")))) ; remark of Paul Li (progn (setq i 0) (repeat (sslength ss) (setpropertyvalue (ssname ss i) "Annotative" 1) (setq i (1+ i)) ) (princ (strcat "\nProcessed objects: " (itoa i))) ) ) (princ) ) ;;; Remove/Add Annotative property to objects [No/Yes] (default No) ;;; Supported objects: TEXT, MTEXT, DIMENSION, MULTILEADER (defun c:SetAnno (/ ss i ans val) ;; Prompt the user, default is No (initget "No Yes") (setq ans (getkword "\nRemove/Add Annotative property to objects [No/Yes] <No>: ")) (if (not ans) (setq ans "No")) ; if Enter pressed — use No (setq val (if (= ans "Yes") 1 0)) ; Yes = 1, No = 0 ;; (if (setq ss (ssget '((0 . "TEXT,MTEXT,DIMENSION,MULTILEADER")))) (if (setq ss (ssget "_:L" '((0 . "TEXT,MTEXT,DIMENSION,MULTILEADER")))) ; remark of Paul Li (progn (setq i 0) (repeat (sslength ss) (setpropertyvalue (ssname ss i) "Annotative" val) (setq i (1+ i)) ) (princ (strcat "\nProcessed objects: " (itoa i) " | Annotative = " ans)) ) (princ "\nNo objects selected.") ) (princ) )
    1 point
  3. I do very little of that sort of thing, but interestingly, I never ran into that issue as I recall. Speaking from experience though, I would make sure any survey data clearly had the coordinate system we use or I would send it back. That's why we paid them money. For my work we have local benchmarks.
    1 point
×
×
  • Create New...