VBA for: select line by angle and length ?

Hi there,

I am working on a file created from a vectorized paper scan.
The file looks pretty good, and all elements are simple lines only.
(no other elements, curves, b-splines etc.)

However, some of the hatched areas still got a bit of  "noise" in it. See below.

Therefore, what I would like to be able to do, is to tidy up the information,
and eliminate some speckles, either through selecting the correct information
and delete the rest, or the other way around.

Ie. "select line by angle" and "select line by length" (or both in one step).

Since this is not a standard selection, I already did a bit of research.
I checked the web, Inga's collection and the postings , but it seems that
there is no matching tool available??

Anyone who can help?

Many thanks!

Jan

PS: I have attached the above pattern as a dgn file, might be of use.

 

hatch.dgn
Parents
  • Hi there,

    Inga , dropped me a link to  Miroslav's "Element Manager".  I will try out  the tool and let you know how it works.

    Many thanks  Inga!

    Jan

  • Sadly at this time this is one thing Element Manager will not do.
    The current versions available expose many of the attributes that are common to most element types with special consideration for cells and text. Rotation is only available for "point" types elements, i.e. Cells and Text. We have not yet settled on a common definition for Rotation Angle for other element types that satifies most people.
    Also, since Length is derived and applicable to linears it is not a queriable attribute.

    Of course, if there is a big enough demand and consensus on implementation, then we will certainly consider adding these features to Element Manager. Length does seem like it would be a desirable addition.

    -G-

  • Many  Thanks  Gerald !

    Jan

     

  • You can take a look at the attached sample.
    Of course there is a half a dozen different ways to code this and I just happened to pick one that seemed to work well with the sample data provided. It might do what you want as-is or at least should give you something to tinker with.

    Enjoy!
    -G-

    SelectLinesJRoth.mvba
  • Gerald,
    This is an amazing tool.
    Exactly what I was after, (button pressed - problem resolved)
    A big time saver to clean up this type of vectorized angular information.

    I did some more tests, and found it can also be applied in many different ways  !

    In case of multiple directions or cross hatches in the same file,
    I did select one direction first,and after that I rotated/mirrored
    the drawing, to proceed with the rest.
    Phantastic !

    Many thanks!

    Jan

Reply
  • Gerald,
    This is an amazing tool.
    Exactly what I was after, (button pressed - problem resolved)
    A big time saver to clean up this type of vectorized angular information.

    I did some more tests, and found it can also be applied in many different ways  !

    In case of multiple directions or cross hatches in the same file,
    I did select one direction first,and after that I rotated/mirrored
    the drawing, to proceed with the rest.
    Phantastic !

    Many thanks!

    Jan

Children
No Data