;;----------------------------------------------------------------------------- ;; simple example how to implement BOM attributes using IK functions ;;----------------------------------------------------------------------------- (in-package :my-special-bom-attr) (use-package '( :oli )) ;;----------------------------------------------------------------------------- ;; examples of how to customize some simple BOM attributes ;;----------------------------------------------------------------------------- (defun my-bom-attr-part-name (selitem) (let ((contents-name (oli::sd-inq-obj-contents-name selitem))) (if contents-name contents-name (oli::sd-inq-obj-basename selitem)) (setf contents-name (sd-string-split (oli::sd-inq-obj-contents-name selitem) "-")) (setf contents-name (second contents-name)) ) ) (defun my-bom-attr-part-no (selitem) (let ((part-no (oli::sd-inq-obj-contents-name selitem))) (if part-no part-no "") (setf part-no (sd-string-split (oli::sd-inq-obj-contents-name selitem) "-")) (setf part-no (first part-no)) ) ) (docu::docu-unregister-bom-attr-all) (docu::docu-register-bom-attr :attr-type "DOCU_BOM_QUANTITY" :attr-title "Quantity" :attr-display t :attr-value-fnc nil) ;; system bom attribute (docu::docu-register-bom-attr :attr-type "PART_NO" :attr-title "Part No" :attr-display t :attr-value-fnc #'my-bom-attr-part-no) (docu::docu-register-bom-attr :attr-type "PART_NAME" :attr-title "Part Name" :attr-display t :attr-value-fnc #'my-bom-attr-part-name)