#|
Attribute Test
Note: This is an example file showing concepts of the Integration Kit.
The code itself is not supported and will never be supported.
|#
(in-package :EXAMPLES)
(use-package :OLI)
(sd-defdialog 'attach_attribute_test
:dialog-title "Attach Attr"
:start-variable 'A_FACE
:variables
'((A_FACE :value-type :face
:title "Face"
:prompt-text "Select a face to attach an attribute to."
:next-variable 'A_STRING)
(A_STRING :value-type :string
:title "Value"
:prompt-text "Enter a string as attribute value."
:next-variable 'A_NUMBER)
(A_NUMBER :value-type :number
:title "Number"
:prompt-text "Enter a number as additional attibute value."))
:ok-action
'(progn
(sd-attach-item-attribute A_FACE "IKIT_TEST_ATTR"
:attachment :instance
:on-copy :copy
:on-merge :maintain
:on-split :copy
:on-xform :maintain
:filing '(:sd-file :mi-file)
:values `(:value-string ,A_STRING
:value-number ,A_NUMBER))))
(sd-defdialog 'inq_attribute_test
:dialog-title "Inquire Attr"
:start-variable 'A_FACE
:variables
'((A_FACE :value-type :face
:title "Face"
:prompt-text "Select a face to inquire the test attribute from."))
:ok-action
'(let ((attr (sd-inq-item-attributes A_FACE :attachment :instance)))
(sd-call-cmds (display "All User Attributes at selected face:"))
(sd-call-cmds (display (format nil "~S" attr)))
(sd-call-cmds (display "Value of IKit Test Attribute:"))
(sd-call-cmds (display (format nil "~S" (sd-inq-item-attribute
A_FACE "IKIT_TEST_ATTR"
:values
:attachment :instance))))))
;;