×
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

NXOpen Cycling through text on a drawing sheet

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?

RE: NXOpen Cycling through text on a drawing sheet

You could always cycle through the object tags filtering results and only return those tags of objects that are drafting notes. From there you can reference those tags to what I assume search the contents of the notes.

CODE --> vb.net

'use this to cycle through object tags
ufs.Obj.CycleObjsInPart
'then ask type and subtype
ufs.Obj.AskTypeAndSubtype
'you will be filtering using these
UFConstants.UF_drafting_entity_type
UFConstants.UF_draft_note_subtype

RE: NXOpen Cycling through text on a drawing sheet

(OP)
Thanks Cowski,

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

I see two potential ways to relate the drawing sheet and the notes that it contains.
  • 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

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