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
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
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 Nextwww.nxjournaling.com
RE: delete entities inside a boundry (rectangle or square) in journal
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