Is there access to Point Cloud tools from VBA?

I need to programmatically manipulate Point Clouds from within VBA.  I really don't need to do that much but it looks like some of what I need to do I can't.

I need to do the following using VBA:

Attach a Point Cloud - This I've already figured out though its a bit convulted

Detach a Point Cloud

Figure out what Point Clouds are attached

Set the View Attributes for the Point Cloud Presentation

Any thoughts on how to do any of these?

If not possible with VBA does anyone know if you can get to any of this via MDL instead?

Thanks,

Mike

  • Unknown said:
    If not possible with VBA does anyone know if you can get to any of this via MDL instead?

    The only API that deals with point clouds is the MicroStationAPI, which is C++, and that's only recently arrived with the latest SSx versions of V8i.

    I'm not sure that point clouds and VBA fit easily together.  Point clouds are huge quantities of data.  VBA is poor at handling huge quantities of data. 

     
    Regards, Jon Summers
    LA Solutions

  • I realize that VBA trying to mess with the actual points within the Point Cloud would be slow.  However, in my case I'm just trying to do the Attach, Detach, change attributes, type commands which are very quick.  The Attach part, which is the part I have working, is very fast so I'm not worried about the speed aspect.  I can run a macro to do the detach, which is also very fast, but unfortunately the user has to select the cloud in the Cloud dialog manually first which makes the macro silly.

    I guess the answer to my question is no which is kind of what I was expecting.

    I've seen you mention the MicroStation API before and I have checked out some of the information on your website.  C++ doesn't scare me as I've written plenty of it but the whole process of getting it setup and going with MicroStation, writing the first few apps, figuring out what can be done in the MicroStation API versus, MDL or VBA is the hurdle I need to attack.

    By the way Jon, I'm a huge fan of yours.  I very much appreciate how much time you devote to answering so many questions here in the Bentley communities and the forum before that.  Over the years I've found a lot of good information in your posts. So a big Thank You for all you do for this community!

    Regards,

    Mike

  • Unknown said:
    I'm just trying to do the Attach, Detach, change attributes, type commands ...

    If you're wanting to perform high-level operations like that then of course VBA could do that without a performance hit.  In the domain of the user interface it's the user, not the computer language, that imposes limits.

    AFAIK there's no UI functionality in the MicroStationAPI, so there's nothing you can call from VBA.  Unlike MDL, where you can use one of the published wrapper declarations to use an MDL function.

    Your best bet is to record a VBA macro while you attach and manipulate a point cloud, and see if that results in anything useful.

    Unknown said:
    I'm a huge fan of yours

    I'm blushing  8-)

     
    Regards, Jon Summers
    LA Solutions

  • "Your best bet is to record a VBA macro while you attach and manipulate a point cloud, and see if that results in anything useful."

    That's the first thing that I try when writing a VBA macro.  It rarely yields the best code but usually gives clues on where to start.  That's the process I used to figure out how to attach a point cloud.  Unfortunately for all the other Point Cloud tasks I want to do the recording yielded nothing but an empty macro.

    I don't really need any UI functionality for this task and would prefer none if I could make the changes via calls that would be exactly what I would want.

    I guess it's time to get jump back into the MDL and the newer MicroStation API world.  First task, writing a "hello world" app that I'm able to debug via Visual Studio.  If I can do that I'm not to worried about figuring out the rest.

    Thanks for answering!

    Mike 

  • Unknown said:
    I guess it's time to get jump back into the MDL and the newer MicroStationAPI

    It's hard getting to grips with the MicroStationAPI because the documentation is terse and there are few examples.  If you've grown up with the C-language procedural style of MDL programming, then the C++ object-based MicroStationAPI is, to coin a phrase, a paradigm shift.  However, if you don't mind your paradigms being shifted, it's a step well worth taking.

    We put some hints and simple examples on our web site.  Dredge the MicroStation Programming Forum for more snippets.

     
    Regards, Jon Summers
    LA Solutions