NXOpen Cycling through text on a drawing sheet
NXOpen Cycling through text on a drawing sheet
(OP)
Dear Forum,
I am looking for a snippet of code to search through the text on a drawing sheet.
Any ideas?
I am looking for a snippet of code to search through the text on a drawing sheet.
Any ideas?





RE: NXOpen Cycling through text on a drawing sheet
CODE --> vb.net
RE: NXOpen Cycling through text on a drawing sheet
However, I suspect the real question is "how to search through the text on a given drawing sheet".
If this is the case, the following thread may be of interest:
thread561-369358: Help me with a Journal to report the text strings in a Multisheet drawing (label or notes)
www.nxjournaling.com
RE: NXOpen Cycling through text on a drawing sheet
I started to review the code within the suggested thread. It seems like you collect all the notes and labels contained within the displayed part and then cycle through all these notes and labels to find which ones are on certain drawing sheets.
Isn't there a way just to get the notes, labels and dimensions on the current open drawing sheet???
I was thinking of using the following line of code.
Dim sheet As DrawingSheet = workpart.DrawingSheets.CurrentDrawingSheet()
Then when the user in using the app. He/she has to make sure they have a particular drawing sheet current before running the app.
Any suggestions or ideas? The nesting seems backwards, get all the notes, labels and find out which ones are on certain drawing sheets.
Thanks.
RE: NXOpen Cycling through text on a drawing sheet
- Query the note object to see what sheet it is on.
- Use the sheet view's .AskVisibleObjects method then sort through the objects to find the notes.
Personally, I'd use the first option to create a way to relate the notes to the drawing sheets. A dictionary object with the key/value pair as the sheet object (key) and list of note objects (value) would allow you to quickly access all of the notes on any given sheet in the file.www.nxjournaling.com