0

ACC has a lot of models, so I need to extract all Project Information Parameters for each model using the Autodesk Platform services, but all the tutorials I found focused on the parameters for the model elements.

It would be helpful if there is a sample of how to extract the project information parameters

Rahul Bhobe
  • 4,165
  • 4
  • 17
  • 32

2 Answers2

0

I doubt you can access that information without downloading and processing each file. Once you have access to the project file, you can read its BasicFileInfo. This information can also be read via the Open Revit OLE Storage, cf. also:

Jeremy Tammik
  • 7,333
  • 2
  • 12
  • 17
0

if you’re looking for the project address, project name, project number, client name, and so on in the RVT, we can do the following in viewer.

async function searchAsync(model, text, attributeNames, options) {
    return new Promise((resolve, reject) => {
        model.search(text, resolve, reject, attributeNames, options);
    });
}

async function getBulkProperties2Async(dbIds, options, model) {
    return new Promise((resolve, reject) => {
        model.getBulkProperties2(
            dbIds,
            options,
            (result) => resolve(result),
            (error) => reject(error)
        );
    });
}


async function getProjectInfo(model, category = 'Project Information') {
    return new Promise(async (resolve, reject) => {
        const found = await searchAsync(model, category, ['Category'], { searchHidden: true });
        if (!found || found.length <= 0) return reject('Project Information not found');

        const result = await getBulkProperties2Async(found, { propFilter: ["Organization Name", "Organization Description", "Building Name", "Author", "Project Issue Date", "Project Status", "Client Name", "Project Address", "Project Name", "Project Number"] }, model);

        if (!result) return reject('Project Information not found');

        const data = result[0];
        return resolve(data);
    });
}

await getProjectInfo(model);

enter image description here enter image description here

Eason Kang
  • 6,155
  • 1
  • 7
  • 24