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
);
Parameters
- foldersToMove
- [in] List of folders to move.
- attributesToMove
- [in] List of attributes to move.
- targetFolder
- [in] Target folder, i.e. the new parent of the folders and attributes to move.
Return Values
NoError- The function has completed with success.
APIERR_BADID-
Incorrect
typeIDwas specified.foldersToMovecontains illegal folder paths, ortargetFolderis illegal, see remarks.foldersToMovecontains a folder path that does not exist, ortargetFolderdoes not exist. APIERR_BADGUID- A GUID in
attributesToMovedoes not refer to an existing attribute of typetargetFolder.typeID. APIERR_BADPARS-
You want to move the root folder.
You want to move a folder into itself, i.e.targetFolderis in a folder to move.
An attribute or folder to move is not of typetargetFolder.typeID.attributesToMovecontains an Xref Layer. APIERR_NOPLAN- There is no open project.
APIERR_NOACCESSRIGHT- User has no permission to delete or create attributes/folders under
typeID. APIERR_NOTMINE- 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.
Remarks
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
targetFolderwill 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.
Requirements
- Version: API 26 or later
- Header: ACAPinc.h
See Also
ACAPI_Attribute_GetFolder,
ACAPI_Attribute_CreateFolder,
ACAPI_Attribute_DeleteFolder,
ACAPI_Attribute_RenameFolder,
ACAPI_Attribute_GetFolderContent,
API Functions