VBA Point Cloud Check

Is it possible to display the Point Cloud attachment names or count how many are attached via VBA? (Mstn v8i or CONNECT Edition)

Reading through earlier posts I can see that there does not seem to be any functionality in VBA to manipulate Point Clouds but hoping that there is some basic functionality available.

Thanks

  • PoinTools APIs

    Manipulation of point clouds is a memory-intensive task.  I believe that, to cope with the size of clouds, PoinTools makes use of memory-mapped files.  AFAIK the C++ MicroStationAPI is the only API that deals with point clouds.

    there does not seem to be any functionality in VBA to manipulate Point Clouds

    VBA dates from the previous century,  when a 32-bit system was the norm.  It evolved from 16-bit forebears.  It has large overheads imposed by its COM interface and associated data marshaling. Consequently, VBA would find it hard going to cope with the memory management required by millions or billions of points.  My guess is that we're unlikely to see any point cloud support in VBA.

     
    Regards, Jon Summers
    LA Solutions

  • Thanks Jon.

    I know that the functionality to manipulate the Point Clouds is not available.

    All I need to do at the moment is to check whether there are Point Clouds attached to the DGN. A bonus would be to also retrieve the file names.

  • All I need to do at the moment is to check whether there are Point Clouds attached to the DGN

    The MicroStationAPI and DgnPlatformNet provide...

    • PointCloudHandler, which will enable a model scan to find any instances of point clouds
    • PointCloudQuery, which inherits from PointCloudHandler, providing information about a point cloud instance

    IPointCloudFileQuery provides the information you request...

    • GetFileName
    • GetNumberOfPoints
    • GetNumberOfClouds
    #include <PointCloudFileEdit.h>
    static IPointCloudFileQueryPtr CreateFileQuery(ElementHandleCR  eh) 

    However, those are all C++ or .NET classes and their methods.  VBA doesn't have the insight to be able to use those directly.  A compromise would be a helper app written in C++ or .NET, probably the latter.  A .NET app can provide a COM interface that you could call directly from VBA.

     
    Regards, Jon Summers
    LA Solutions

    Answer Verified By: Peter Willmen