Drawing Properties (DWGPROPS) (Windows-summarytab) (readable)

Discussion in 'AutoCAD' started by ManfredW, Jul 29, 2003.

  1. ManfredW

    ManfredW Guest

    How to write those Drawing Properties (DWGPROPS), so that it will show up in Windows (properties, summary)?????? tab I,ve created a proggy (see below) to write properties, but then Windows (properties) has 3 extra tabs with the info, wich is OK, but i want also the info in Windows properties, summary tab

    So how to do this ???

    ;------------------------------------------------------------------------------------- note: this command (getfield "teile_unit") is for retrieving info from a database ;-------------------------------------------------------------------------------------

    ; Setting DWG properties ; (defun Set_DWGPROPS (List_of_Props_to_change / SDP_DWGPROPS Number_of_UserProps new_xRecord SDP_new_Property Without_List Name_xRecord SDP_new_List Props_Counter SDP_old_Property comp_Props)    (if (and (setq SDP_DWGPROPS (dictsearch (namedobjdict) "DWGPROPS"))     (listp List_of_Props_to_change)) (progn        (setq Props_Counter 0)        (while (< Props_Counter (length List_of_Props_to_change)) (setq SDP_new_Property (nth Props_Counter List_of_Props_to_change) SDP_old_Property (assoc (car SDP_new_Property) SDP_DWGPROPS) SDP_new_List (subst SDP_new_Property SDP_old_Property SDP_DWGPROPS) SDP_DWGPROPS SDP_new_List Props_Counter (+ Props_Counter 1)))        (setq Props_Counter 0 Number_of_UserProps 0)        (while (< Props_Counter 10) (if (/= (cdr (assoc (+ 300 Props_Counter) SDP_new_List)) "=") (setq Number_of_UserProps (+ Number_of_UserProps 1))) (setq Props_Counter (+ Props_Counter 1)))        (setq SDP_new_List (subst (cons 90 Number_of_UserProps) (assoc 90 SDP_new_List) SDP_new_List)         Without_List (list -1 5 102 330) Props_Counter 0 new_Xrecord (list))        (while (< Props_Counter (length SDP_new_List)) (setq comp_Props (nth Props_Counter SDP_new_List)) (if (not (member (car comp_Props) Without_List)) (setq new_xRecord (append new_xRecord (list Comp_Props)))) (setq Props_Counter (+ Props_Counter 1)))        (entdel (cdr (car SDP_new_List)))        (setq Name_xRecord (entmakex new_xRecord))        (dictadd (namedobjdict) "DWGPROPS" Name_xRecord))))

    ;MW ----------------------------------------------------- (defun C:DWGprop () (prompt "\n\nWriting DWGproperties ... ") ;-------------------------------------------------------- ;USERDEF

    (setq Zeichnung (spacecut (getfield "Zeichnung"))) (if (= Zeichnung nil)     (setq Zeichnung "") ) (setq TagNr (spacecut (getfield "tag_nr"))) (if (= TagNr nil)     (setq TagNr "") ) (setq Schrank (spacecut (getfield "Schrank"))) (if (= Schrank nil)     (setq TagNr "") ) (setq Titel1 (spacecut (getfield "titel_1"))) (setq Titel2 (spacecut (getfield "titel_2"))) (setq Titel3 (spacecut (getfield "titel_3"))) (if (or (= Titel3 "NIL") (= Titel3 nil))     (setq Titel3 "") ) (setq Anlage (spacecut (getfield "Anlage" ))) (setq BE (spacecut (getfield "teile_unit" ))) (if (= BE nil)     (setq BE "") ) (setq Typ (spacecut (getfield "Typ" ))) (if (= Typ nil)     (setq Typ "") ) (setq Gruppe (spacecut (getfield "Gruppe" ))) (if (= Gruppe nil)     (setq Gruppe "") ) (setq RevisionIndx (spacecut (getfield "Rev_B_Neu" ))) (setq RevisionText (spacecut (getfield "Rev_T_Neu" ))) (setq RevisionDate (spacecut (getfield "Rev_D_Neu" ))) (setq RevisionName (spacecut (getfield "Rev_N_Neu" ))) (if (= RevisionIndx nil)     (setq RevisionIndx "") ) (if (= RevisionText "NIL")     (setq RevisionText "") ) (if (= RevisionDate "NIL")     (setq RevisionDate "") ) (if (= RevisionName "NIL")     (setq RevisionName "") )

    (set_dwgprops (list      (cons 300 (strcat "Zeichnung=" Zeichnung))      (cons 301 (strcat "Titel1=" Titel1))      (cons 302 (strcat "Titel2=" Titel2))      (cons 303 (strcat "Titel3=" Titel3))      (cons 304 (strcat "Anlage=" Anlage))      (cons 305 (strcat "BE=" BE))      (cons 306 (strcat "Typ=" Typ))      (cons 307 (strcat "Gruppe=" Gruppe))      (cons 308 (strcat "TagNr/Schrank=" TagNr))      (cons 309 (strcat "Revision=" RevisionIndx " | " RevisionText " | " RevisionDate " | " RevisionName))      )) ;--------------------------------------------------------

    ;-------------------------------------------------------- ;DEFAULT

    (setq Keywords (strcat Zeichnung " " TagNr " " Anlage " " " " BE " " Typ " " Gruppe)) (set_dwgprops (list      (cons 7 Keywords)      ))

    (setq Comments (strcat Zeichnung (chr 13)(chr 10) Titel1 (chr 13)(chr 10) Titel2 (chr 13)(chr 10) Titel3 (chr 13)(chr 10) Anlage (chr 13)(chr 10) BE (chr 13)(chr 10) Typ (chr 13)(chr 10) Gruppe (chr 13)(chr 10) TagNr (chr 13)(chr 10) RevisionIndx " | " RevisionText " | " RevisionDate " | " RevisionName ))

    (set_dwgprops (list      (cons 6 Comments)      ))

    ;-------------------------------------------------------- (prompt "done") (princ) ;(command "DWGPROPS") ) ;
     
    ManfredW, Jul 29, 2003
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.