BIM Coordinator Program (INT) April 22, 2024
Find the next step in your career as a Graphisoft Certified BIM Coordinator!
Archicad C++ API
About Archicad add-on development using the C++ API.

Detect physical file verses file in a library

Anonymous
Not applicable
Hi, I am using file.Open (IO::File::ReadMode) to determine if a texture file exists on disk. However it appears to return NoError when a file which is embedded inside a .pla is specified. Is there some way to determine if the file is an actual file, or inside a .pla pls?

Thanks

Paul
1 REPLY 1
Tibor Lorantfy
Graphisoft Alumni
Graphisoft Alumni
Hi Paul,

IO::fileSystem.Contains should be used for checking if file exists.
#include "FileSystem.hpp"


	IO::Location fileLoc (<path>);

	bool		exists = false;
	GSErrCode	err = IO::fileSystem.Contains (fileLoc, &exists);
	if (err != NoError)
		ErrorBeep ("Error in IO::fileSystem.Contains", err);
Regards,
Tibor
Learn and get certified!

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!