×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

delete entities inside a boundry (rectangle or square) in journal

delete entities inside a boundry (rectangle or square) in journal

delete entities inside a boundry (rectangle or square) in journal

(OP)
Hi -

Does anyone know if it should be possible to find notes inside a "rectangle" defined by two set of coordinates from a journal.

Let's say on a drawingsheet notes that resides "inside" the coordinates X200,Y200 and X300,Y400 can by collected into an array.

My task is to do automate deleting of only some notes one sheet - the area where they residens are known.

lklo

RE: delete entities inside a boundry (rectangle or square) in journal

I have some similar code that I used to extract the title from old drawings. The variables titleLowLeft and titleUpRight in the code below are of type Point3D; they are used to define the boundary of the drawing title area in the title block.

Here's the relevant snippet:

CODE

For Each tempNote As Annotations.Note In workPart.Notes

    'test to see if the note is in the title block "drawing title" box
    If tempNote.AnnotationOrigin.X < titleLowLeft.X Then
        Continue For
    End If

    If tempNote.AnnotationOrigin.Y < titleLowLeft.Y Then
        Continue For
    End If

    If tempNote.AnnotationOrigin.X > titleUpRight.X Then
        Continue For
    End If

    If tempNote.AnnotationOrigin.Y > titleUpRight.Y Then
        Continue For
    End If

    'if we get here, the note is in the box
    'code to process note

Next 

www.nxjournaling.com

RE: delete entities inside a boundry (rectangle or square) in journal

(OP)
Cowski -

It is an ingenious way to "define" the Square. Simpel and cleane solution.

Thank you very much.

( I have written an NXOpen API which fully automaticly replace our Tilteblocks in all sheets in our dwg parts. )

(But we also have some old dwg part's which contains patterns - I have choosen to divide theese task's in two programs.
And after the sequence where I delete the patterns - there are some notes left that needed to be deleted.
I can do this with the snippet you provided me. The coordinates can be predefined after I have asked for the sheet size )

so everything is Ok.

lklo

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources