Get feature class/raster file size in file geodatabase from standalone script

529
1
Jump to solution
08-07-2023 11:58 AM
NicolasRacine
New Contributor

Hello everyone, I'm currently trying to make a standalone script to list the file size of data present in a file geodatabase such as feature classes and rasters. I know this information is available when in the catalog view of ArcGIS Pro where one of the column shows the size of datasets in kilobytes.

I've began looking at acquiring this information via arcpy but from my research it seems this type of information can only be acquired via the sdk.

So far I've found this property https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic27573.html  but, correct me if I'm wrong, it seems to be only accessible when executing code as an add-in and not as a standalone script.

My question would thus be if I'm on the right path or there's another way to get file sizes of datasets in a file geodatabase.

0 Kudos
1 Solution

Accepted Solutions
Wolf
by Esri Regular Contributor
Esri Regular Contributor

You are correct, those classes that you need are only available through ArcGIS Pro API assemblies that are accessible via Add-ins.   When you create a Pro SDK console standalone application (referred to as a CoreHost application) the assemblies you need are not accessible.   Corehost applications only have access to the ArcGIS.Core and ArcGIS.CoreHost assemblies.  

View solution in original post

1 Reply
Wolf
by Esri Regular Contributor
Esri Regular Contributor

You are correct, those classes that you need are only available through ArcGIS Pro API assemblies that are accessible via Add-ins.   When you create a Pro SDK console standalone application (referred to as a CoreHost application) the assemblies you need are not accessible.   Corehost applications only have access to the ArcGIS.Core and ArcGIS.CoreHost assemblies.