Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IFRs on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting CreateNote to Annotations.Note 1

Status
Not open for further replies.

Twullf

Mechanical
Jan 24, 2012
196
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.
 
Replies continue below

Recommended for you

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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor