Quantcast
Channel: MicroStation Programming - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 383

V8-VBA Trapping an error when using .GetNamedGroup("plot")

$
0
0

Below is the start of my code. When I get to last line I am getting an error because group "plot" does not exist. I anticipate this group will not always exist but I can not figure how to trap this error? I would prefer to perform a check and see if group "plot" exists? Works great as long as the specified group exists.

 

Sub ProcessModel(ByVal oModel As ModelReference)
Dim ndgStartGroup As NamedGroupElement
Dim NamedGroupContents() As NamedGroupMember
Dim eleStartElement As ShapeElement
Dim p3dStartPoint() As Point3d
Dim I As Integer
Dim J As Integer
 ' Routine reviews attachments for group name "plot"
 
Set ndgStartGroup = oModel.GetNamedGroup("plot")
NamedGroupContents = ndgStartGroup.GetMembers

........

 

Thanks


Viewing all articles
Browse latest Browse all 383

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>