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
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
CODE
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
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
CODE
{part}.Annotations.TableSectons {part}.Annotations.CustomSymbolswww.nxjournaling.com