cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Streamline your workflows and master BIM coordination! Program starts April 28!

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

Inserting file types into DG::FileDialog::Save

Not applicable
Hi,

I'm trying to insert file types into the selector at the bottom of the save dialog, but as far as I can tell I need the ID number for each file type? Here's what I've got so far:
FTM::GeneralID png;
png.Load(5);
UIndex i = dialog.AddFilter(png);
dialog.SetFilterText(i, ".png");

It seems if I want to add more I need to know the exact ID for each file type. Is there a list anywhere or am I approaching this in the completely wrong way?

Cheers
3 REPLIES 3
Take a look at the Communication Manager example project with the dev-kit, specifically the function GetOpenFile in Communication_Manager.cpp. It's adding a type to the 'open' dialog, but the same principle applies to saving.
Ralph Wessel BArch
Central Innovation
Not applicable
That worked perfectly. Thanks for the help.
Not applicable
rCushing wrote:
That worked perfectly. Thanks for the help.
I tried changing the code in the example to work with Save dialog and it seems to work with the extension (plan) but it crashes when I click save..
Could you post your code please?