Arbortext Command Language > Repository API > dobj_set_attr
  
dobj_set_attr
dobj_set_attr (dobj, attr, val[, idx])
For the object with the ACL document object handle dobj, this function assigns the value val to the metadata attribute attr. If the desired metadata attribute contains an array, use the optional idx to set the desired entry in the array.
To set a Repository API attribute, the attr parameter should have one of two formats:
The ACL abstraction of the attribute. ACL attribute names have the format IO_ATTR_NAME, where NAME is different for a specific attribute. The attributes that can be used with this function are listed in the ACL Attribute Name column of the Attributes names for developers section of your adapter documentation. This function can accept dobj attribute names but will not accept sess attribute names.
The repository's name for the attribute. If you supply an attribute name that does not have the IO_ATTR_NAME format, the function will pass the literal name through to the repository. Using this method, you can access attributes in the repository that are not abstracted in ACL.
If either the dobj or attr values are invalid, or the operation fails, the function places error data in $main::ioerr and returns a zero (0). If successful, the function returns a one (1).
This function does not commit all attribute changes to the repository until the repository object is closed (using the user interface or the dobj_close function). To commit changes to the repository sooner, use the dobj_save function and specify the option to save attributes.