Is there a way to identify or highlight any lines, points & / or elements in a 2D drawing that are off grid without interrogating each individually?

Hey Guys, I have a problems when I use microstation file ( including existing and new file) that some element are off grids, it not algin to grid point.

I wonder we have tools or VBA file to identify or highlight point, circle, shape ...if they are girds off. because, Some drawing need to grid on when drawing.

Thanks.

Parents
  • What is the exact version no. (e.g. v10.x.y.z) of MicroStation that you are using? Use key-in VERSION to see the version no. in the MicroStation Message Center, or Help→About MicroStation in the backstage.

    See this blog that shows you how to obtain MicroStation's version number.

    If you're using an additional product (e.g. ProjectWise, OpenXxx) let us know about that too!


    some element are off grids

    What do you mean by 'off grid'?

     
    Regards, Jon Summers
    LA Solutions

  • Hi Jon, I'm drawing electrical schematics & need to know that all my connections land on grid points. i am using drawings that have been previously created & would like to be able to open a drawing & run a command of some sort that would highlight lines whose end points don't land on a grid point.

  • If we are only needing to check line/line-strings, then a different approach I would consider would be to write a VBA Macro that scans the active model for only elements of those type, interrogates the coordinates of the start point, end point and any vertices in-between, to see see if their values are multiples of the current Grid Units. I'm thinking that the modulo operator would be perfect for the job to detect points off-grid. Then simply store the ID's of each rogue element and add them to a selection set. As a visual aid to highlight the problematic vertices, you could also create a circle or line-string (real geometry or transient element) that surrounds/passes through each off-grid vertex.

    Once the Macro has completed, I'd put the selection into a Display set and work on correcting each element's vertices, then removing each corrected element from the Display Set as I go.

    It works in my head, but not something I've done previously.

  • yes, That I ever think before, but my knowledge with vba is less, so I'm still research it. Thanks your advice. 

  • After looking into this, I can confirm that my initial theory was correct:

    (Right-click on the images and choose Open in New Tab to view full-screen)

    You can see in the above clip that any elements drawn on a major or minor gridline will not have any of its vertices highlighted, but those which are not, will be. You can also see that once an element's vertices are corrected i.e. positioned back onto the grid, they are no longer highlighted. For clarity and to demonstrate the manipulation of vertices, I didn't have the rogue elements automatically selected but you can see this in effect, below:

Reply
  • After looking into this, I can confirm that my initial theory was correct:

    (Right-click on the images and choose Open in New Tab to view full-screen)

    You can see in the above clip that any elements drawn on a major or minor gridline will not have any of its vertices highlighted, but those which are not, will be. You can also see that once an element's vertices are corrected i.e. positioned back onto the grid, they are no longer highlighted. For clarity and to demonstrate the manipulation of vertices, I didn't have the rogue elements automatically selected but you can see this in effect, below:

Children