×
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

Need Help on Following journal

Need Help on Following journal

Need Help on Following journal

(OP)
Hi,

I created a following Journal to move a note orgin from one place to another, After running the note is still in the old Place.
After that I am not even able to select or move the note manually.But when i checked the note properties orgin got moved to new place but not the note.
Also i want to extend this for all sheets not for sheet by Sheet.

Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.UI
Imports NXOpen.UF
Imports NXOpen.Annotations
Imports NXOpen.Drawings



Module NXJournal
Sub Main

Dim theSession As Session = Session.GetSession()
Dim workpart As Part = theSession.Parts.Display
Dim Sheets As DrawingSheetCollection = workpart.DrawingSheets


Dim sheetArray As DrawingSheet() = Sheets.ToArray()
Dim currentSheet As DrawingSheet = Sheets.CurrentDrawingSheet
Dim objs As DisplayableObject() = currentSheet.View.AskVisibleObjects()



For Each obj As DisplayableObject In objs
If (TypeOf obj Is Note) Then
Dim Note1 As Note = CType(obj, Note)
For Each text_line As String In Note1.GetText()
if text_line.ToUpper.Contains("RX-400") then
dim point as point3d
point = Note1.AnnotationOrigin
Dim Point1 As Point3d = New Point3d(5.8612326801127, 0.542791619141274, 0.0)
note1.AnnotationOrigin = Point1


End If
Next
End If
Next

End Sub
End Module

RE: Need Help on Following journal

After you change the origin point, call the note object's .RedisplayObject() method.

www.nxjournaling.com

RE: Need Help on Following journal

(OP)
Thanks Cowski, Thats Worked well. Also I want to Extend it to all sheets like a stamp in all sheets Do i need to loop the command to all the sheets or anyother option Available.

RE: Need Help on Following journal

You could wrap your code in a loop that works on each sheet in the array, or you could loop through the part's .Notes collection. This would give you access to all the notes in the part file regardless of the sheet it resides on; also, you would be able to eliminate the object type check since every object returned would be a note object.

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