Archicad C++ API
About Archicad add-on development using the C++ API.

Get the size of a library part

gustavorochakv
Booster

Hello,

 

I'm trying to collect the actual size (in bytes) of the library parts on a project's embedded library, but I haven't figured out a way to do it so far.

 

Since I couldn't find any way to achieve this through the Archicad C++ API, I thought that I could use the filesystem API to directly check the file size at the temporary location stored on its location property, but that seems to point to a folder inside a zero bytes file (no idea if it's a virtual filesystem or some sort of file database).

 

Is there a way to achieve this? Am I missing something obvious?

 

PS: my actual goal is listing which library parts exceeed a specific size criteria, so the worst offenders can be properly optimized and/or moved from the embedded library to a separate library.

3 REPLIES 3
Barry Kelly
Moderator

Why do you need to create an app when all you have to do is open the Library Manager and look at the list of objects in the embedded library?

I know it is not spitting out a list of the exact offending objects, but it seems like a lot of trouble to go to to create an app, and then have users find and run that app, when all they have to do is look at the Library Manager.

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Kevin Lee
Enthusiast

if you are serious about creating a plug-in to manage library files, could you consider making a tool that purges unused lib objects? Deleting dumb things that come from importing files like IFC and Rhino is so boring.....

Kevin Lee

Director of Technology | BIM

TZG Architects

We're automating as much of our auditing procedure as possible, this is but one of the items that are checked (we're about one third of the way there, still some 60 checklist items to go).

 

If it's not technically feasible or extremely complex to implement then we'll leave it as a manual procedure for now, but if there's a reasonable way to implement this then that's one less manual procedure on the auditing proccess.