Moves attributes and attribute folders.

    GSErrCode  ACAPI_Attribute_Move (
        const GS::Array<API_AttributeFolder>&       foldersToMove,
        const GS::Array<GS::Guid>&                  attributesToMove,
        const API_AttributeFolder&                  targetFolder



[in] List of folders to move.
[in] List of attributes to move.
[in] Target folder, i.e. the new parent of the folders and attributes to move.


Return Values

The function has completed with success.
Incorrect typeID was specified.
foldersToMove contains illegal folder paths, or targetFolder is illegal, see remarks.
foldersToMove contains a folder path that does not exist, or targetFolder does not exist.
A GUID in attributesToMove does not refer to an existing attribute of type targetFolder.typeID.
You want to move the root folder.
You want to move a folder into itself, i.e. targetFolder is in a folder to move.
An attribute or folder to move is not of type targetFolder.typeID.
attributesToMove contains an Xref Layer.
There is no open project.
User has no permission to delete or create attributes/folders under typeID.
An attribute or folder which is not client created is to be moved, and the user is not reserving attribute type typeID.

For other common API errors see the API Errors document.



All folders (items of foldersToMove and targetFolder) have to be existing folders.

Handling name collisions:

  • If there are name collisions, the moved folders will be merged with the colliding folders in targetFolder, like in a filesystem.
  • Name collision of folders is case insensitive. An existing folder in targetFolder will not be renamed. E.g. merging ‘foo’ into an existing ‘Foo’ keeps the ‘Foo’ name.
  • Name collision between two moved folders will be handled in order of appearance in foldersToMove. E.g. moving ‘A/foo’ and ‘B/Foo’ (in this order) to ‘Bar’ will result in ‘Bar/foo’, because ‘foo’ is first created in ‘Bar’, and then it is not renamed to ‘Foo’.

foldersToMove and attributesToMove can contain repeated items. Repeated items will be handled as if only the first occurrence would be present in the list.

foldersToMove and attributesToMove can contain items which are already under targetFolder. Such items will be left in place.

foldersToMove and attributesToMove can contain items which are under a folder to move. Such items will be ignored, as if they would not be on the list, and only the outermost folder will be moved.

A folder or attribute cannot be moved out of its attribute type.



Version: API 26 or later
Header: ACAPinc.h


See Also

API Functions