find closest intersection point on xref'ed grid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have in my Autocad drawing an xref'ed building column line grid. For this conversation, the grid lines are on layer Column_Line, the lines have a 40' by 40' spacing between them on the x and y axis and the xref is located on layer xref in the drawing I am working in.
As I insert blocks into the drawing, I would like to automate dimensioning from the block insertion point to the closest intersection of closest X/Y grid lines. I am currently able to insert the block and create the dimensions using VBA. But currently I have the second point of the dimension just as the origin of the drawing. So i need to move the second point after it get drawn in.
Saw some code online about doing an expanding selection set crossing until it finds a point, but I can't get it to work with the xref.
Thoughts?