I am currently trying to find a way in VBA to identify cells where the distance to the next cell is less than 600 mm.
In MDL-help I found the function "mdlMinDist_betweenElms" which sounds quite perfect for me - the only problem I have is that I have not too much knowledge in MDL ...
The function "mdlMinDist_betweenElms " asks for 3 inputs:
I got this function running but I do not know what the 3rd input (closestPoint) means.
Can someone help me?
When there are two or more equal miniDist between two elms, the one closer to this closestPoint will be returned.
HTH, Yongan
Answer Verified By: quasi_modo
Hi Yongan, this means I can use "Point3dZero" here if I do not require that information ...
Unknown said: This means I can use "Point3dZero" here if I do not require that information
I would provide the origin of one of the cells. Point3dZero could affect the way the algorithm works.
Keep in mind a big difference between the default coordinate values used by MDL and VBA. VBA works with your model's master units, while MDL works with your model's units-of-resolution (UORs).
Regards, Jon Summers LA Solutions
I have changed my procedure to use one of the cell origins as suggested!
Thanks for all your input guys!!
Just a related observation - if I remember it correctly, mdlMinDist_betweenElms is not always doing what you may expect.
It computes minimumum distance between two element wireframes.
If you expect minimum distance to a surface you may find it is not the case (i.e. whenever the matematically correct distance should be measured to a point inside of a planar polygon).
I haven't checked whether above still holds true in the most recent MicroStation versions, but maybe Bentley can clarify.
Cheers,
/Chris Z.
Hi Chris
I am creating a procedure which identifies power outlets in buildings which are located in an area < 600 mm to the next water pipe.
For this case I think it's okay if it uses the wireframes and not surfaces.
Anyway - thanks a lot for this notice!