We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

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

API realnumbers.h error

Anonymous
Not applicable
Hi All,

I get an error:
1>c:\program files (x86)\graphisoft\api development kit 17.3002\support\modules\geometry\RealNumber.h(76): error C2220: warning treated as error - no 'object' file generated
1>c:\program files (x86)\graphisoft\api development kit 17.3002\support\modules\geometry\RealNumber.h(76): warning C4091: 'static ' : ignored on left of 'const double' when no variable is declared
1>c:\program files (x86)\graphisoft\api development kit 17.3002\support\modules\geometry\RealNumber.h(76): error C2143: syntax error : missing ';' before 'constant'
1>c:\program files (x86)\graphisoft\api development kit 17.3002\support\modules\geometry\RealNumber.h(76): error C2059: syntax error : 'constant'
1>c:\program files (x86)\graphisoft\api development kit 17.3002\support\modules\geometry\RealNumber.h(79): warning C4091: 'static ' : ignored on left of 'const double' when no variable is declared
1>c:\program files (x86)\graphisoft\api development kit 17.3002\support\modules\geometry\RealNumber.h(79): error C2143: syntax error : missing ';' before 'constant'
1>c:\program files (x86)\graphisoft\api development kit 17.3002\support\modules\geometry\RealNumber.h(79): error C2059: syntax error : 'constant'

when I include model.hpp

Any ideas what could be the problem?

I would like to get the elements in the opened model.

Thx: Andor
5 REPLIES 5
Ralph Wessel
Mentor
AndorSzamos wrote:
I get an error:
1>c:\program files (x86)\graphisoft\api development kit 17.3002\support\modules\geometry\RealNumber.h(76): error C2220: warning treated as error - no 'object' file generated
1>c:\program files (x86)\graphisoft\api development kit 17.3002\support\modules\geometry\RealNumber.h(76): warning C4091: 'static ' : ignored on left of 'const double' when no variable is declared
1>c:\program files (x86)\graphisoft\api development kit

when I include model.hpp
Any ideas what could be the problem?
Which version of the API are you working with, e.g. 17?

Also, are you able to compile the example project ModelAccess_test?
Ralph Wessel BArch
Software Engineer Speckle Systems
Anonymous
Not applicable
Hi Ralph,
Thanks for your reply.

I am using 17 and I started to modify listing manager as a base project .

I am able to compile modelaccess without errors.
Ralph Wessel
Mentor
AndorSzamos wrote:
Hi Ralph,
Thanks for your reply.

I am using 17 and I started to modify listing manager as a base project .

I am able to compile modelaccess without errors.
Does your code define EPS anywhere?
Ralph Wessel BArch
Software Engineer Speckle Systems
Anonymous
Not applicable
Ralph,

Sorry for the late answer I was taking a break. Hope you had a nice holiday as well.

In realnumber.h EPS is already defined, it is the same code as in ModelAccess.
Is it better to reverse engineer ModelAccess?

This is the include part of my code:

#include <math.h>

#include <string.h>


#include "ACAPinc.h" // also includes APIdefs.h

#include "APICommon.h"
#include "DGModule.hpp"
#include "DG.h"

#include <Model.hpp>

#include "MDIDs_APICD.h"


If you outcomment #include Model.hpp everything works fine. using include "Model.hpp" doesn't help.

Thank you for your help.
Ralph Wessel
Mentor
AndorSzamos wrote:
In realnumber.h EPS is already defined, it is the same code as in ModelAccess.
Yes, that's why I'm asking if you may have also defined EPS anywhere else. The error you reported can occur if EPS was already defined before RealNumber.h was parsed.
Ralph Wessel BArch
Software Engineer Speckle Systems