PDA

View Full Version : sd-add-item-attribute-values


ceuro
11-30-2004, 08:43 AM
I want to add attributes and values to an object, but the names of these attributes are not always the same.
I'm using the function sd-add-item-attribute-values in this way :
(sd-add-item-attribute-values object "object_name" `(:attribute_name, value) :attachment :contents ).
I know that attribute_name is a symbol but I need to pass the content of a variable to set the attributes dinamically.
Is there any workoround to do this ?
Thx

Thom Ivancso
11-30-2004, 12:45 PM
I do not know if this is what you are looking for, but I wrote a lisp routine that attaches a attribute to a part. The attribute is taken from a logical table passed through a dialog menu.


(sd-attach-item-attribute PARTS "MATERIAL_TYPE"
:attachment :contents
:on-copy :maintain
:on-merge :maintain
:on-split :maintain
:on-xform :maintain
:filing '(:sd-file :mi-file)
:values `(:value-string ,MATERIAL)
)


The attribute passed is called MATERIAL which is the name of the variable from the dialog menu. The MATERIAL attribute is taken from the logical table.


HTH

Cheers
Thom