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.

** Operator

TomWaltz
Participant
I see the operator ** all over the API, and for the first time, actually need to deal with it.

I'm familiar with pointers and memory references, and I am finding I cannot search for "C++ **" on Google....

Can anyone tell me what that means?
Tom Waltz
9 REPLIES 9
Anonymous
Not applicable
its a pointer to a pointer

eg.
int testVal; // integer
int* testValPointer; // pointer to integer
int** pointerToTestValPointer;

testValPointer = &testVal;
pointerToTestValPointer = &testValPointer;

this is how handles are implemented

so for instance to access a parameter of an element you use
(*memo.params)[parameterIndex].value.real

the * dereferences the params array, and as you should know arrays in C are just pointers
TomWaltz
Participant
Thanks, Adam.

Things like this remind me why I really hate C and C++ sometimes.... not that I like any othe language better... I just really hate pointers sometimes!

Why is it that no one on my side of the world (except Karl) knows this stuff?
Tom Waltz
Anonymous
Not applicable
TomWaltz wrote:
...Why is it that no one on my side of the world (except Karl) knows this stuff?
Tom,
I imagine you question is rhetorical, but I feel the same way at times about the limited pool of resources for development here "on our side of the world."

It would be great learn of others, here locally, that have the skills/expertise to assit in developing localized tools/techniques. If anyone like this is out there please "raise your hand" so we know who you are.

Dan K
TomWaltz
Participant
Tom, I imagine your question is rhetorical,
Sort of. From what I know of, there is a very small pool of people making add-ons through the Archicad API system.

There are a ton of people using GDL, but not a lot of architects out there who know C++... or understandably, would even want to.
Tom Waltz
stefan
Expert
I have had some similar frustrating experience with a triplet: *** (sounds like some really bad language).

P.S. I'm an architect but I do love C++ although it's frustratingly complex at times. You're not completely alone, but for ArchiCAD it is a rather small community...
--- stefan boeykens --- bim-expert-architect-engineer-musician ---
Archicad27/Revit2023/Rhino8/Unity/Solibri/Zoom
MBP2023:14"M2MAX/Sonoma+Win11
Archicad-user since 1998
my Archicad Book
TomWaltz
Participant
stefan wrote:
I have had some similar frustrating experience with a triplet: *** (sounds like some really bad language).

P.S. I'm an architect but I do love C++ although it's frustratingly complex at times. You're not completely alone, but for ArchiCAD it is a rather small community...
I have my days that I love it..... some that I hate it.... and some that I wonder if I'm just in over my head!
Tom Waltz
Anonymous
Not applicable
TomWaltz wrote:
stefan wrote:
I have had some similar frustrating experience with a triplet: *** (sounds like some really bad language).


You must be programming on a Mac. It's been a while since I did MacOS programming, I didn't think they still used that pointer to a handle methodology--although I understand why they did it.
P.S. I'm an architect but I do love C++ although it's frustratingly complex at times. You're not completely alone, but for ArchiCAD it is a rather small community...


I'm more of a C++ guy (15years as a C++ programmer) and a newbie in these parts. Is there any discussion anywhere on the topic of GDL fs. CA++ for add-ons in AC? Or, is it just preference?
Karl Ottenstein
Moderator
socrates wrote:
I'm more of a C++ guy (15years as a C++ programmer) and a newbie in these parts. Is there any discussion anywhere on the topic of GDL fs. CA++ for add-ons in AC? Or, is it just preference?
I assume you mean "GDL vs C++" ?

Not a preference ... there is no option to create add-ons with GDL. Sounds like you need to learn more about ArchiCAD before thinking of programming add-ons (the focus of this forum)...?

Karl
One of the forum moderators
AC 27 USA and earlier   •   macOS Ventura 13.6.6, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
Ralph Wessel
Mentor
TomWaltz wrote:
From what I know of, there is a very small pool of people making add-ons through the Archicad API system.
There are a ton of people using GDL, but not a lot of architects out there who know C++... or understandably, would even want to.
I'm both an architect and software developer, and work extensively with C++ developing ArchiCAD add-ons (amongst other things). I only read ArchiCAD-Talk every other day though, so someone else usually answers the questions before I've even read them.
Ralph Wessel BArch
Learn and get certified!