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

Inspect/visualise GS class instances in Visual Studio

Sam Karli
Enthusiast

Maybe a completely naive question, but I have difficulties visualizing/inspecting GS class instances when I do debugging and control hits a breakpoint. All this in Visual Studio that I believe Graphisoft devs use (in Windows, I mean).

An example: checking a content of GS::UniString, when I want to see obviously something string like. Or checking a GS::Guid/API_Guid that I want to see, too, a meaningful string representation.

 

The most obvious sollution would be something like adding the string to the watches, but it doesn't have a member containing the string value. Next try would be something like adding a "someGSUniStringVariable.ToCStr().Get()" row to the watches, but this doesn't work, either.

 

There are (overkill-looking) possible sollutions, like inheriting own classes from GS:: classes and adding the members needed for visualization or, as the devkit stuff in question is editable, adding the members directly to the header files there.

 

But obviously, none of these sollutions are "elegant". However, it's hard to imagine that other folks don't need to check these instances, so how to do it?

GDL/Python/C++ dev
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
gustavorochakv
Booster

Are you using the Graphisoft visualizers (https://archicadapi.Graphisoft.com/tools-for-debugging)? Not all structures are covered, but it does work with UniString, Array, and so forth.

View solution in original post

2 REPLIES 2
Solution
gustavorochakv
Booster

Are you using the Graphisoft visualizers (https://archicadapi.Graphisoft.com/tools-for-debugging)? Not all structures are covered, but it does work with UniString, Array, and so forth.

Thanks, I have missed this!

GDL/Python/C++ dev