;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; for CoCreate SolidDesigner ;; Description: ;; inquire UWGM Status as color for structure browser ;; ;; Reference : https://ww3.cad.de/foren/ubb/Forum29/HTML/004580.shtml ;; Docu : https://support.ptc.com/help/creo_elements_direct/r20.7.0.0/advanced_documentation/integration_kit/reference/filing_and_os.html ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Filename : cadde-29-004580a.lsp ;; Version : 1.0 version by der_Wolfgang ;; 1.1 added german and spanish as additional languages ;; Created : Wed Apr 9 18:34:04 CEST 2025 ;; Modified : Tue Apr 22 17:59:51 CEST 2025 ;; Author : der_Wolfgang@forum@cad.de ;; Download : cad.de ? ;; SD-Version : developed with PE80 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (in-package :cadde-wt) (use-package :oli) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; gets an obj = 3D-sel-item ;; inquire the UWGM status and map it to a color ;; ;; TODO need to be adjust to available LC Status and your language ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun uwgm-inq-color-by-obj-status (obj) (let ((wt-status (sd-string-upcase (or (sd-uwgm-inq-status obj) "")))) (cond ((equal wt-status "IN WORK") "#FF9999") ;; light red ((equal wt-status "IN CREATION") "#99FF99") ;; light green ((equal wt-status "UNDER REVIEW") "#FF8080") ;; orange ((equal wt-status "RELEASED") "#22AA22") ;; green ((equal wt-status "LOCKED") "#DD0000") ;; red ;; for best performance place your language to the top ((equal wt-status "Wird bearbeitet") "#FF9999") ;; light red ((equal wt-status "In Prüfung") "#FF8080") ;; orange ((equal wt-status "Freigegeben") "#22AA22") ;; green ((equal wt-status "Gesperrt") "#DD0000") ;; red ;; for best performance place your language to the top ((equal wt-status "En curso") "#FF9999") ;; light red ((equal wt-status "Revisión en curso") "#FF8080") ;; orange ((equal wt-status "Liberado") "#22AA22") ;; green ((equal wt-status "Bloqueado") "#DD0000") ;; red (T "#555555") ;; anything else .. light grey ) ;; end cond ) ;; end let ) ;; end defun (defun uwgm-get-browser-status-color (node name) (declare (ignore name)) (when (sd-is-pseudo-folder-node-p (BrowserNode-NODEID node)) (setq node (first (sd-query-browser name :GET-CHILDREN node)))) ;; don't like it that much (let* ((objname (BrowserNode-objPname node)) (objlist (sd-string-split (BrowserNode-objPath node) "\"")) ;;;; \" )) feature name? (objpath (if (> (length objlist) 1) (second objlist) (first objlist))) (obj (sd-pathname-to-obj objpath)) ) (if (sel_item-p obj) (uwgm-inq-color-by-obj-status obj) ;; NIL ;; default color: means black in most cases ) ) ;; end let ) ;; end defun ;; now let's configure it to use the new function (sd-browser-add-interrogator "parcel-gbrowser" :interrogator-type :text-color :interrogator-func 'uwgm-get-browser-status-color )