Data.findFileById Method

Parent Object: Data
Defined in namespace "adsk::core" and the header file is <Core/Dashboard/Data.h>

Description

Returns the DataFile identified by the input id. This can fail is there isn't a DataFile identified with the specified id or if the current user doesn't have privileges to access the file.

Syntax

"data_var" is a variable referencing a Data object.
returnValue = data_var.findFileById(id)
"data_var" is a variable referencing a Data object.

#include <Core/Dashboard/Data.h>

returnValue = data_var->findFileById(id);

Return Value

Type Description
DataFile Returns the DataFile is one was found matching the input id or null if one was not found or you don't have privileges to access it. You can use the Application.getLastError method to determine the reason for the failure.

Parameters

Name Type Description
id string The full id of the file will be something similar to that shown below. The version argument can be omitted which will result in getting the latest version.

urn:adsk.wipprod:fs.file:vf.NazykCYLRWKZ5tpzJtEQ1A?version=3

This is also the same id that you'll obtain if you use the Forge Data Management API.

Version

Introduced in version December 2020