Submitted by NXUser on Tue, 11/30/2021 - 00:41
Forums:
Need help to extract a text of a note at particular position onto drawing sheet.
I have gone through various journals available here which allows user to select object/objects with cursor.
Since the position of a note on drawing is not precise, I want to select the Note with rectangular selection by providing inputs like co-ordinates of rectangle Corner1 and Corner2 something similar to view operation .Zoombyrectangle
re: select drawing note
Given the coordinates of the rectangular selection, you could loop through the notes and check the annotation origin. This strategy would work as long as you only cared about the annotation origin in relation to the selection rectangle. If, for example, the annotation origin was the top left of the note and it landed near the bottom right of the selection rectangle, it would be flagged as in the selection even though most of the note text would fall outside of it.
If the entire note needs to fall within the selection rectangle, you might be able to use the bounding box of the note and compare that to the selection rectangle. I'm not sure if the bounding box function works on note objects; if not, you could use the AskDraftAidTextInfo method to get the bounds of the note object.