Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

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

Status
Not open for further replies.

lklo

Industrial
Nov 24, 2010
226
0
0
DK
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
 
Replies continue below

Recommended for you

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
 
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
 
Status
Not open for further replies.
Back
Top