The Global ARCHICAD Community

Stay informed. Get help. Share your knowledge.

Discussions about using GRAPHISOFT's tools (API DevKit) for independent software developers

Moderators: Barry Kelly, Karl Ottenstein, LaszloNagy, ejrolon, gkmethy, Tibor Lorántfy, MOREH Tamas, Akos Somorjai, Ed Brown, Mihály Palenik

Hello, I am researching how to import custom point cloud from ArchiCAD Add-on.
In documentation I’ve found the article how to import e57 point cloud format by calling ARCHICAD's Point Cloud Importer add-on (via Communication Manager).
The approach to obtain GSPS file and call POINTCLOUD “points.gspc” GDL is working.

But this workflow has disadvantages in our case, due two double conversion. We have convert our custom point cloud into e.57, then write it to .gspc file and then perform import.

It would be great to have ability to create IPointCloud object dynamically and place it in the document on some command.
We are very interested in PointCloud/PointCloudManager modules (located in API Development Kit 22.3004\Support\Modules folder in dev sdk), which seem to provide ability to create IPointCloud objects, and draw them using NativeContext (PointCloudUtils.hpp file).
Could you please clarify if we can use this approach, and what effort will it take.

Valeria Klimenko
Hi Valeria,

Answering your question in the subject: yes, currently the only supported way to programmatically import point clouds into ARCHICAD is through the E57 format. Generally speaking, point cloud-related headers in the Support/Modules folder are not meant to be used by add-ons. They describe only a small part of point cloud functionality in ARCHICAD and are very low-level, so I guess these aren't what you really need anyways. But I hope we can make the Communication Manager approach work for you somehow. I would like you to share us some details on what your exact problem is, so we can assist you better.

By double conversion, if I get it right, you mean your point cloud data -> E57 and E57 -> GSPC. What is the specific disadvantage of this process for you? Do you find that the two-step conversion takes too long and you would like to speed up the process? Or maybe you have precision issues because of the different floating-point representations used in GSPC, E57 and your custom data format? Or something else?

Best regards,
Hi Bálint,

Thank you for your reply.
Our main concern of e57 format using is performance. We measured the time needed for conversion of e57 point cloud to GSPC file and got following results:

  • e57 of size 33 MB to GSPC conversion takes 0.930 – 0.960 seconds
  • e57 of size 111 MB to GSPC conversion takes 1.960 – 2.035 seconds
  • e57 of size 137 MB to GSPC conversion takes 3.880 – 4.050 seconds
  • e57 of size 535 MB to GSPC conversion takes 21.880 – 22.420 seconds

The two-step conversion (our point cloud -> e57 ->GSPC ) will take much longer.

Any pre-processing (importing or conversion method) should be ruled out. Point cloud is usually very large and will not be possible to fit all points in memory. That's why we would like to be able to draw points using Native Context directly. And Support/Modules/PointCloud module with its IPointCloud Interface and drawing utils seem to be the right approach. The only question is if this functionality can be accessed from Add-On.

Valeria Klimenko
Hi Valeria,

Thanks for the clarification, I now see that the main issue for you is conversion time. I will try to answer your concerns.

I guess you are familiar with the document "Import Point Clouds from ArchiCAD Add-Ons", but please let me summarize ARCHICADs point cloud workflow from the Add-On developers point of view, just for reference:
  1. import point cloud data into a GSPC file
  2. create a GSM which refers to the GSPC file via POINTCLOUD GDL command (see the 'GDL Reference Guide' for details)
    • technically, GRAPHISOFT's Point Cloud Import Add-On packs the GSPC and the corresponding GSM file together in an LCF file which is then loaded as a linked Library.
  3. Place the GSM using the Object Tool.
Then the point cloud is displayed on the floor plans, sections, elevations and in the 3D window. In all views the user can snap to the points of the cloud. AC handles memory issues (it dynamically streams the point data from the disk through memory and towards the graphics card), optimizes the drawing process etc.

To answer your question, no, unfortunately it is not possible to use the functions in the Support/Modules/PointCloud headers and we don't intend to make it possible in the future. These headers are in the DevKit for solely technical reasons. However once you have a GSM for your GSPC and you place it as an Object, ARCHICAD will take care of the memory issues you mentioned and much more. I probably miss your point, but I don't see why you would want to draw the point cloud data directly then? Could you please describe in a bit more detail the use cases you want to support with your Add-On, and explain why the functinality provided by ARCHICAD does not fit for your needs?

Regarding your concern about conversion time, I agree it is unfortunate that you can not convert directly from your format to GSPC. I know of no concrete decision that we won't provide an API for that in the future, but as far as I know it is not planned in the short term. However the conversion time seems to be a cost that have to be paid only once. You have to convert a set of point cloud data only once (might it take a couple of minutes, or a few tens of minutes if you have a really large data set) and then just use it from the Library through the workflow I described above. You don't have to convert the same data ever again, just carry around your GSPC and GSM files. I consider this one-time cost acceptable, but maybe I'm missing your point here again - if so, please explain it.

Kind regards,