The Global Archicad Community

Stay informed. Get help. Share your knowledge.

Discussions about using GRAPHISOFT's tools (Archicad API, BIMx API, BIMcloud API) for independent software developers

Moderators: Karl Ottenstein, LaszloNagy, ejrolon, Barry Kelly, Gordana Radonic, nbalogh, mnguyen, gkmethy, rmasaki, Viktor Kovacs, MOREH Tamas, Akos Somorjai, Ed Brown, Mihály Palenik, Tibor Lorántfy

By Nayan
#324681
I am working on an add-ons where I need to export user data as XML format. For this I have included DGLib, GSXMULtils, GSXML and InputOutput Module library to my project using the CMakelists (Using the archicad add-on template for the development).
But getting an error in "FormatXMLDoc(document, &xmlFile)" method and not getting any idea what's doing wrong here becuase in the Property_test Example add-on it works file.
Can anyone kindly help me on this?

N.B. Attached are the error and the code snippet for this.
Attachments
Error.PNG
Error.PNG (24.94 KiB) Viewed 287 times
CMakelists.PNG
CMakelists.PNG (33.88 KiB) Viewed 287 times
include.PNG
include.PNG (18.08 KiB) Viewed 287 times
Code.PNG
Code.PNG (23.48 KiB) Viewed 287 times
User avatar
By Viktor Kovacs
#324791
I've checked with your settings, and it works fine for me. Could you please specify which Archicad version are you targeting, and what version of Visual Studio are you using?
By Nayan
#324812
Viktor Kovacs wrote: Sun Apr 18, 2021 8:33 pm I've checked with your settings, and it works fine for me. Could you please specify which Archicad version are you targeting, and what version of Visual Studio are you using?
I am targeting Archicad version 24. And for Visual Studio IDE I have tried with both VS2017 and VS2019 but getting the same error.
N.B. For CMake build I have used VS2017.
By Nayan
#324936
Viktor Kovacs wrote: Sun Apr 18, 2021 8:33 pm I've checked with your settings, and it works fine for me. Could you please specify which Archicad version are you targeting, and what version of Visual Studio are you using?
Hi Viktor Kovacs, any suggestion or idea on this error, what's possibly I'm doing wrong here?
By Nayan
#325165
Viktor Kovacs wrote: Mon Apr 26, 2021 3:25 pm Unfortunately I have no idea. If you have a minimal repro and you can attach it here as a zip file I can check it on my computer.
Dear Viktor Kovacs, Here I have attached the project in zip format.
I have added the minimal code for the XML export that simulates my error.
You can find the XML export related code in TemplateDialog.cpp file.

N.B. Attached pic is the error snapshot I am facing and I have used the CMake build. (ARCHICAD 24 & VS2017)
Attachments
(14.61 KiB) Downloaded 1 time
Error.PNG
Error.PNG (27.66 KiB) Viewed 132 times