Message 1 of 6

Not applicable
08-02-2016
06:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello
Ihave this little routine
The changes for the layer work fine, but the changes for the values of the ATTDEF not.
The values will not updated on the screen (when I close and open the drawing it is not updated too). When I explode the block, the attribs have the new value!
How can I update the block on the screen.
(defun c:edit-block-entities () (setq lst (list)) (setq ent (car (entsel))) (setq entList (entget ent)) (setq BlockName (cdr (assoc 2 entList))) (if (setq ent (tblobjname "block" BlockName)); get the BLOCK entity (while (setq ent (entnext ent)); Step through the entities in the block definition (setq entList (entget ent)) (prompt (strcat "\nEntity: " (cdr (assoc 0 entList)))) (if (= (cdr (assoc 0 entList)) "ATTDEF") (progn ;funktioniert nicht mit Attribs (prompt (strcat "\nATTDEF: " (cdr (assoc 2 entList)) "-" (cdr (assoc 3 entList)) "---" (cdr (assoc 1 entList)))) (setq entList (subst (cons 1 "aaa") (assoc 1 entList) entList)) (entmod entlist) )) (if (= (cdr (assoc 0 entList)) "LINE") (progn (prompt (strcat "\nLINE: " "---" (cdr (assoc 8 entList)))) (setq entList (subst (cons 8 "6-2") (assoc 8 entList) entList)) (entmod entlist) )) (setq lst (cons ent lst)); Construct a list of the block components ) ) (command "_attsync" "n" BlockName) (entupd (tblobjname "block" BlockName)) (command "_regen") (reverse lst) ;; Return the list )
Solved! Go to Solution.