Hello -

Looking to speed this up / make more efficient. It reads distance to from grid to category and populates a shared parameter to tag (Tested with light fixture and structural column) Any help would be appreciated.

Thanks!

- Jason

Hello -

Looking to speed this up / make more efficient. It reads distance to from grid to category and populates a shared parameter to tag (Tested with light fixture and structural column) Any help would be appreciated.

Thanks!

- Jason

I would look to:

- Get the coordinates of the grids in Y and X (this could even be relative to an auxiliary coordinate system if your building is rotated)
- Get the location of the tags
- Round the tag location X and Y coordinates to the nearest grid dimension (round to the nearest n-spacing)
- Create two dictionaries of grids for those orientated in the X and Y axes, and use their n-spacing as the keys
- Use the result from 3 to access the dictionary and return the nearest grids

This would eliminate all the processes which are slowing your graph:

- No need to extract the curves from the grids
- No need to perform expensive geometry intersections
- No need to compute distance to, to establish proximity

Update on this, I struggled with getting the coordinates of the grids and the math calcs so I asked for help in the office and here is his result, no library of grid spacing, instead simple math calculations to determine which grid line each lighting fixture center point is closest to.

Thoughts?

Edit: Forgot to mention this only works for horizontal and vertical grids.

@Thomas_Mahon