×
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

Removing stickiness from NXOpen application with code from a journal

Removing stickiness from NXOpen application with code from a journal

Removing stickiness from NXOpen application with code from a journal

(OP)
I have created a VB.NET NXOpen application with a code snippet from a journal. In the application I am attempting to move a title block but the "ID" of the title block changes lets say when it is placed on Sheet 2. How can I get the identifier of the title block and substitute workPart.FindObject("HANDLE R-575156") with some type of ID that is not hard coded? Below is a code snippet I am working with.


Dim titleBlock1 As Annotations.TitleBlock = CType(workPart.FindObject("HANDLE R-575156"), Annotations.TitleBlock)

I am running NX 8.5 and using VB.NET for this project.

Thanks

RE: Removing stickiness from NXOpen application with code from a journal

You can access all of the title blocks in a part through the DraftingManager property:

CODE

workPart.DraftingManager.TitleBlocks 

If you want to move all the title blocks, iterate through the collection moving each in turn. If you only want to move a certain one, you'll need some way to determine which is the correct one. Do you only want to move the title block on sheet 2, for example? If so, you'll need a way to determine which one resides on sheet 2. There is a function in the following thread that will determine which sheet a drafting object resides on (see the post dated: 13 Aug 14 15:58).

thread561-369358: Help me with a Journal to report the text strings in a Multisheet drawing (label or notes)

www.nxjournaling.com

RE: Removing stickiness from NXOpen application with code from a journal

(OP)
Hey thanks Cowski, that worked great for my titleblock but I now have two other objects I need a substitute for, a TableSection and a CustomSymbol. I have tried looking through the Object Browser in Visual Studio but so far have had no luck. Do you have any suggestions for these two?

Dim tableSection2 As Annotations.TableSection = CType(workPart.Annotations.TableSections.FindObject("HANDLE R-14928"), Annotations.TableSection)

Dim customSymbol1 As Annotations.CustomSymbol = CType(workPart.FindObject("HANDLE R-902617"), Annotations.CustomSymbol)

Thanks again,

RE: Removing stickiness from NXOpen application with code from a journal

Table sections and custom symbols each have their own collections:

CODE

{part}.Annotations.TableSectons
{part}.Annotations.CustomSymbols 

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