The Global Archicad Community

Stay informed. Get help. Share your knowledge.

Discussions about using GRAPHISOFT's tools (Archicad API, BIMx API, BIMcloud API) for independent software developers

Moderators: Karl Ottenstein, LaszloNagy, ejrolon, Barry Kelly, gkmethy, rmasaki, MOREH Tamas, Akos Somorjai, Ed Brown, Mihály Palenik, Tibor Lorántfy

User avatar
By Ziv Abraham
#305333
Hi,
I would like to use file dialog to get a folder path for saving purposes. I don’t want to use the folder dialog because than I can’t paste a path, and it’s generally less comfortable.
I would like to filter the “files of type” to only folders, not seeing any other types of files.
Adding a picture of the code
2AF866E3-5C6A-47E0-968C-7A0796C4BA4C.jpeg
.
Thanks!
#306657
Hi,

You have to implement a FileDialogObserver for that dialog, and return false from the IncludeFile callback:
Code: Select all
void	OpenNotesObserver::IncludeFile (const DG::FileDialogIncludeFileEvent& /*ev*/, bool* enable)
{
	*enable = false;
}
Best, Akos
By jerry
#308314
Akos Somorjai wrote:
Fri Feb 07, 2020 4:27 pm
Hi,

You have to implement a FileDialogObserver for that dialog, and return false from the IncludeFile callback:
Code: Select all
void	OpenNotesObserver::IncludeFile (const DG::FileDialogIncludeFileEvent& /*ev*/, bool* enable)
{
	*enable = false;
}

Best, Akos

Hi.
I implement a FileDialogObserver as above. But the method is invalid.
Is there any other method? Thanks.