![]() |
FormIt C++ API
v23.0.0 (2023.0.0)
|
Namespaces | |
FormIt::Forge::UI | |
Functions | |
FORMIT_CORE_EXPORT FormIt::Forge::ErrorCode | FormIt::Forge::SetForgeMode (Forge::ForgeMode mode, 1::string path) |
instantiate forge mode for testing More... | |
FORMIT_CORE_EXPORT FormIt::Forge::ErrorCode | FormIt::Forge::CheckEntitlements (const 1::string &token) |
CheckEntitlements() function. More... | |
FORMIT_CORE_EXPORT FormIt::Forge::ErrorCode | FormIt::Forge::InitHttpClient (const FormIt::StringType &uri) |
Initializes an http client to be used on Forge calls. More... | |
FORMIT_CORE_EXPORT FormIt::Forge::ErrorCode | FormIt::Forge::GetHubsWithProjects (const 1::string &token, 1::vector< HubInfo > &hubs) |
Obtains the hubs for the logged in account in BIM360. More... | |
FORMIT_CORE_EXPORT FormIt::Forge::ErrorCode | FormIt::Forge::GetContentPermissions (const 1::string &token, const Forge::ProjectInfo &project, FolderContents &content) |
Obtains BIM 360 permissions of files and folders inside a folder content from a BIM 360 project. More... | |
FORMIT_CORE_EXPORT Forge::ErrorCode | FormIt::Forge::GetTopFolders (const 1::string &token, const Forge::HubInfo &hub, const Forge::ProjectInfo &project, Forge::FolderContents &topContent) |
Obtains the top folders of a BIM 360 project (top folders refers to the content of project root folder) More... | |
FORMIT_CORE_EXPORT FormIt::Forge::ErrorCode | FormIt::Forge::ListContents (const 1::string &token, const ProjectInfo &project, const 1::string &folderId, FolderContents &contents) |
List the contents of a given folder in BIM360. More... | |
FORMIT_CORE_EXPORT FormIt::Forge::ErrorCode | FormIt::Forge::DownloadFile (const 1::string &token, const FileInfo &fileInfo, 1::vector< unsigned char > &data) |
Downloads a file from BIM360. More... | |
FORMIT_CORE_EXPORT FormIt::Forge::ErrorCode | FormIt::Forge::UpdateRemoteFile (const 1::string &token, const FileData &fileData, const 1::string &projectId, FileInfo &fileInfo) |
Updates an existing file in BIM360. More... | |
FORMIT_CORE_EXPORT FormIt::Forge::ErrorCode | FormIt::Forge::CreateRemoteFile (const 1::string &token, const 1::string fileName, const 1::vector< unsigned char > &data, const 1::string &destinationFolder, const 1::string &projectId, FormIt::Forge::FileInfo &fileInfo) |
Creates a new file in BIM360 within a specified folder. More... | |
FORMIT_CORE_EXPORT FormIt::Forge::ErrorCode | FormIt::Forge::GetThumbNail (const 1::string &token, const FormIt::Forge::FileInfo &file, 1::vector< unsigned char > &data) |
Returns the thumbnail image for the given file. More... | |
FORMIT_CORE_EXPORT FormIt::Forge::ErrorCode | FormIt::Forge::CreateThumbNailDerivative (const 1::string &token, const FormIt::Forge::FileInfo &file) |
Create the thumbnail via the derivate service. More... | |
FORMIT_CORE_EXPORT FormIt::Forge::ErrorCode | FormIt::Forge::GetRevitFamilyInfo (const 1::string &token, FormIt::Forge::FileInfo &file) |
Get Revit information via the derivative service First ensures that file exist in Derivative Service calling CreateThumbNailDerivative in order to request Revit Family info of file. More... | |
FORMIT_CORE_EXPORT::string | FormIt::Forge::GetSerialNumber (1::string &token) |
Get the Pelican Entitlement serial number. More... | |
FORMIT_CORE_EXPORT FormIt::Forge::ErrorCode FormIt::Forge::CheckEntitlements | ( | const 1::string & | token | ) |
CheckEntitlements() function.
[in] | token | The Bearer Token obtained from Forge. |
FORMIT_CORE_EXPORT FormIt::Forge::ErrorCode FormIt::Forge::CreateRemoteFile | ( | const 1::string & | token, |
const 1::string | fileName, | ||
const 1::vector< unsigned char > & | data, | ||
const 1::string & | destinationFolder, | ||
const 1::string & | projectId, | ||
FormIt::Forge::FileInfo & | fileInfo | ||
) |
Creates a new file in BIM360 within a specified folder.
This function creates the first version of a file.
token | The Bearer Token obtained from Forge. | |
fileName | A string representing the name of the file. | |
data | An array representing the file contents to upload. | |
destinationFolderID | The folderID for the project that owns the file. | |
projectId | The project Id that owns the file. | |
fileInfo | A reference to the FileInfo struct representing the newly created file, obtained as ouptput. | |
[in] | destinationFolder |
FORMIT_CORE_EXPORT FormIt::Forge::ErrorCode FormIt::Forge::CreateThumbNailDerivative | ( | const 1::string & | token, |
const FormIt::Forge::FileInfo & | file | ||
) |
FORMIT_CORE_EXPORT FormIt::Forge::ErrorCode FormIt::Forge::DownloadFile | ( | const 1::string & | token, |
const FileInfo & | fileInfo, | ||
1::vector< unsigned char > & | data | ||
) |
FORMIT_CORE_EXPORT FormIt::Forge::ErrorCode FormIt::Forge::GetContentPermissions | ( | const 1::string & | token, |
const Forge::ProjectInfo & | project, | ||
FolderContents & | content | ||
) |
Obtains BIM 360 permissions of files and folders inside a folder content from a BIM 360 project.
The folder content must belong to the project. PermissionsInfo (BIM 360 Permissions struct) attribute is updated on each FileInfo and FolderInfo inside the FolderContents passed as input parameter.
token | The Bearer Token obtained from Forge. | |
project | The selected project to work with. | |
contents | A reference to the FolderContents containing a collection of FolderInfos and FileInfos where their PermissionsInfo are updated. | |
[out] | content |
FORMIT_CORE_EXPORT FormIt::Forge::ErrorCode FormIt::Forge::GetHubsWithProjects | ( | const 1::string & | token, |
1::vector< HubInfo > & | hubs | ||
) |
FORMIT_CORE_EXPORT FormIt::Forge::ErrorCode FormIt::Forge::GetRevitFamilyInfo | ( | const 1::string & | token, |
FormIt::Forge::FileInfo & | file | ||
) |
Get Revit information via the derivative service First ensures that file exist in Derivative Service calling CreateThumbNailDerivative in order to request Revit Family info of file.
A returned Forge::ErrorCode::Success ensures that Revit Family info was obtained and placed in Forge::FileInfo param.
FORMIT_CORE_EXPORT ::string FormIt::Forge::GetSerialNumber | ( | 1::string & | token | ) |
Get the Pelican Entitlement serial number.
A std::string is returned with the value.
token | The Bearer Token obtained from Forge. |
FORMIT_CORE_EXPORT FormIt::Forge::ErrorCode FormIt::Forge::GetThumbNail | ( | const 1::string & | token, |
const FormIt::Forge::FileInfo & | file, | ||
1::vector< unsigned char > & | data | ||
) |
FORMIT_CORE_EXPORT Forge::ErrorCode FormIt::Forge::GetTopFolders | ( | const 1::string & | token, |
const Forge::HubInfo & | hub, | ||
const Forge::ProjectInfo & | project, | ||
Forge::FolderContents & | topContent | ||
) |
Obtains the top folders of a BIM 360 project (top folders refers to the content of project root folder)
token | The Bearer Token obtained from Forge. |
hub | The hub that contains the project |
project | The selected project to look up for its top folders. |
topContent | A reference to the project's base folder content (top folders) that will be populated as output |
FORMIT_CORE_EXPORT FormIt::Forge::ErrorCode FormIt::Forge::InitHttpClient | ( | const FormIt::StringType & | uri | ) |
Initializes an http client to be used on Forge calls.
uri | The URI for Forge eg. https://developer-stg.api.autodesk.com". |
FORMIT_CORE_EXPORT FormIt::Forge::ErrorCode FormIt::Forge::ListContents | ( | const 1::string & | token, |
const ProjectInfo & | project, | ||
const 1::string & | folderId, | ||
FolderContents & | contents | ||
) |
List the contents of a given folder in BIM360.
The folder belongs to a project and the ouput can contain folders and/or files.
token | The Bearer Token obtained from Forge. |
project | The selected project to work with. |
folderId | The id of the selected folder. |
contents | A structure containing a collection of FolderInfo and FileInfo for the folder selected |
FORMIT_CORE_EXPORT FormIt::Forge::ErrorCode FormIt::Forge::SetForgeMode | ( | Forge::ForgeMode | mode, |
1::string | path | ||
) |
instantiate forge mode for testing
[in] | mode | |
[in] | path |
FORMIT_CORE_EXPORT FormIt::Forge::ErrorCode FormIt::Forge::UpdateRemoteFile | ( | const 1::string & | token, |
const FileData & | fileData, | ||
const 1::string & | projectId, | ||
FileInfo & | fileInfo | ||
) |
Updates an existing file in BIM360.
It bumps up the version of the modified file
token | The Bearer Token obtained from Forge. |
fileData | A FileData structure containing the FileInfo of the current version of the file and a vector of unsigned chars of new data. |
projectId | The project Id that owns the file. |
fileInfo | A reference to the FileInfo struct representing the new version of the file, obtained as ouptput. |