I use MicroStation connect update 16 and trying to automate a process with VBA. I like to find the way to determine the shape element (is a grid of rectangular shapes) that contains or is intersected by a fence drawn by the user.
I thought about using the the "ElementsScanCriteria" and use the method: "IncludeOnlyWithinRange" but there is no example for the method and I am new to vba and microstation programing. Any help would be much appreciated.
Point3dInPolygonXY
Segment3dClosestPoint
Hi Maria,
Maria Barabas said:I am new to vba and microstation programing
To start MicroStation VBA without knowing VBA well can be killing and confusing combination.
Maria Barabas said:but there is no example for the method
I recommend to check all examples and code snippets in MicroStation VBA documentation, plus examples delivered with MicroStation installation. And of course to search this forum (btw Chinese programming forum often contains useful discussions too). There is no big difference between IncludeOnlyWIthinRange and other scan criterias, so at first try to become familiar with the scanning concept itself, with simpler filters like element types or levels. After that, the range scanning is just an extension.
Maria Barabas said:I like to find the way to determine the shape element (is a grid of rectangular shapes) that contains or is intersected by a fence drawn by the user.
In my opinion, when you are interested in the fence interaction analysis, you should start with fence itself and to obtain its content. It tells you, what elements are "in fence" accordingly to defined mode (inside, crossing...).
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point