The INST and LOC attribute definitions on the new IEC4 library were left
marked "invisible" on purpose. This is because it was anticipated some users
might want to use the new "combined inst/loc prefix tagging mode" that
appears in AcadE 2005. For those users, the IEC4 lib would be the better
choice because the INST and LOC attribute values would be hidden (because
they're already included in the TAG1/TAG2 values).
But, it's easy to flip the whole IEC4 library to have the INST and LOC
attributes marked "visible". Use the utility shown below:
1. Paste utility below into a file with a ".lsp" extension (ex:
flip2visible.lsp). APPLOAD it one time
2. Select the "Components" pulldown menu --> "Symbol Library" --> "Modify
Symbol Library" utility.
3. Browse to and select the c:\program files\autodesk\acade 2005\IEC4 folder
and then, on the subdialog edit box marked "Run AutoLisp", enter in this
4. Hit Start
That should do it.
(defun c:flip2visible ( / ss en ix slen newed ed atnam atrec70 name_list )
; Symbol library tool - Flip attdefs INST and LOC to "visible"
; Call this from the Symbol Library Modification Wizard by 1) APPLOADING
; this routine one time and then 2) entering this into the edit box
; for the AutoLisp function:
; Enter list of attribute names that are to be processed
(setq name_list (list "LOC" "INST"))
; Begin processing. Get all ATTDEFS in the drawing.
(setq ss (ssget "_X" '((0 . "ATTDEF"))))
(if (/= ss nil)
(setq slen (sslength ss))
(setq ix 0)
(while (< ix slen) ; cycle through each ATTDEF
(setq en (ssname ss ix)) ; get entity name
(setq ed (entget en)) ; open the entity
(setq atnam (cdr (assoc 2 ed))) ; get ATTDEF name
(setq atrec70 (cdr (assoc 70 ed))) ; get the visible/invisible flag
(if (member atnam name_list)
(progn ; hit an ATTDEF that is listed to check
; Check if the "invisible" flag bit is set (1's bit)
(if (= (logand atrec70 1) 1)
(progn ; yes, invisible bit is set. Clear it.
(setq atrec70 (1- atrec70))
; Write new value back to entity
(setq newed (subst (cons 70 atrec70) (assoc 70 ed) ed))
(princ "\n ******** ")
(princ " flipped to visible")
(setq ix (1+ ix))
(setq ss nil) ; release selection set