cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Developer forum
GDL coding questions, Python and add-on development using the API Dev Kit.

ACAPI_RegisterModelessWindow‘s PaletteAPIControlCallBack couldn't debug

Anonymous
Not applicable
Hi.
I register modeless dialog by ACAPI_RegisterModelessWindow api.
But the breakpoint can not enter callback function when debugging.
I want to know why can not enter callback.
1 ACCEPTED SOLUTION
2 REPLIES 2

Solution
Akos Somorjai
Graphisoft
Graphisoft
Hi,

The dialog you register should inherit from DG::Palette:
class FavoritePalette : public DG::Palette {};
Could you please show your ACAPI_RegisterModelessWindow() call?

Also, make sure that you return APIAddOn_Preload from your CheckEnvironment() function.

A trick: add a GUID for your palette, and generate the reference ID from it, to ensure that it's unique:
const GS::Guid paletteGuid ("{DAA252EE-CFB4-42BA-8483-0D255D03D17E}");
const Int32 paletteRefId = (Int32) GS::GenerateHashValue (paletteGuid);
then use these in your ACAPI_RegisterModelessWindow() call.

Best, Akos

Anonymous
Not applicable
Akos wrote:
Hi,

The dialog you register should inherit from DG::Palette:
class FavoritePalette : public DG::Palette {};
Could you please show your ACAPI_RegisterModelessWindow() call?

Also, make sure that you return APIAddOn_Preload from your CheckEnvironment() function.

A trick: add a GUID for your palette, and generate the reference ID from it, to ensure that it's unique:
const GS::Guid paletteGuid ("{DAA252EE-CFB4-42BA-8483-0D255D03D17E}");
const Int32 paletteRefId = (Int32) GS::GenerateHashValue (paletteGuid);
then use these in your ACAPI_RegisterModelessWindow() call.

Best, Akos
Thanks.
According to your method, this problem is solved.

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!