×
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

Converting CreateNote to Annotations.Note

Converting CreateNote to Annotations.Note

Converting CreateNote to Annotations.Note

(OP)
I am modifying an existing automation. I simply wish to select the note and change its color. Current note creation code reads:

CODE

ufs.Drf.CreateNote( 1, RootLineNote, RootLineNotePt, 1, TheNote ) 
I wish to change the color using the following code:

CODE -->

Dim displayModification1 As DisplayModification
      displayModification1 = theSession.DisplayManager.NewDisplayModification()

      displayModification1.ApplyToAllFaces = False

      displayModification1.ApplyToOwningParts = False

      displayModification1.NewColor = 108

      Dim objects1(0) As DisplayableObject
      Dim note1 As Annotations.Note = CType(workPart.FindObject("ENTITY 25 25 1"), Annotations.Note)

      objects1(0) = note1
      displayModification1.Apply(objects1)

      displayModification1.Dispose() 

I need to get the previously created note set as an Annotations.Note so I can reference it as an object.

Any help would be greatly appreciated.

RE: Converting CreateNote to Annotations.Note

The variable TheNote is the tag of the note object. You can use the ObjectManager to return the object of a given tag.

Try something like this:

CODE

Dim myNote As Annotations.Note
myNote = Utilities.NXObjectManager.Get(TheNote) 

www.nxjournaling.com

RE: Converting CreateNote to Annotations.Note

(OP)
That worked!

Thanks

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