[v8i SS3 vba] Count smart solid/surface?

Hi fellow hackers,

I am looking for a way to count "smart" elements using VBA.

I plan to use the ElementEnumerator together with BuildArrayFromContents, to get the count.
According to this old post from 2012, the smart elements should be exposed in vba by now, but I don't see that. I really don't wanna go through all the elements if I don't have to, but anything will be better than nothing.

- I don't see them anywhere in the manual?
- The ElementScanCriteria does not have any msdElementType constant defined that indicates it is a smart element. (like msdElementTypeShape would be used to filter shapes)

I speculate..

They might be cell elements, and the elementenumerator still doesn't know how to find them?
Maybe I must use the ElementScanCriteria IncludeSubtype? But I see no information about the subType (assuming) constants anywhere in the manual. All the manual says is that the subType is a long?

Maybe I don't have the "new" vba installed? I notice the title of the F1-Help document says Microstation V8 Visual Basic for Applications help, (and not v8i SS3)

But any ideas on how to get the count of smart solids/surfaces are welcome :)

Parents Reply Children
  • I take your word on that whole programmers not being lazy thing.. From a personal point of view, I code because I am lazy! I am probably the most lazy person I know - which has led to automations saving thousands of hours for my coworkers. ;)

    Unknown said:

    VBA is not good environment for scanning huge datasets, because it requires very intensive memory allocation...

    True that. On a side note, and something that might pop up in another thread sometime: It seems the culprit is getting details from levels, but even that is to be honest fairly fast. About the whole "time" issue: My coworkers asked how long it would take to re-analyze all our files, and I replied "ages"... They looked scared.. .. "something like 20 minutes", and they literally laughed in relief! :D Time is indeed relative ;) The manual process would take weeks if not more and be very prone to human errors. Heh! :)

    System: Win7 64bit 16GB Ram - microStation V8i SS3 08.11.09.578. + PoinTools CONNECT. - Intel i7-4800MQ CPU@2.70GHz, 4 core / 8 Logic proc.