Forums:
Hi,
I have small recorded macro to change color of selected face to my desired color code I need a small change that it should allow and apply to multiple faces selected... where i need to change in code
Option Strict OffImports System Imports NXOpen Module NXJournal Sub Main (ByVal args()AsString) Dim theSession As NXOpen.Session= NXOpen.Session.GetSession()Dim workPart As NXOpen.Part= theSession.Parts.Work Dim displayPart As NXOpen.Part= theSession.Parts.Display Dim markId1 As NXOpen.Session.UndoMarkId markId1 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Visible, "Edit Object Display") Dim displayModification1 As NXOpen.DisplayModification displayModification1 = theSession.DisplayManager.NewDisplayModification() displayModification1.ApplyToAllFaces=True displayModification1.ApplyToOwningParts=True displayModification1.NewColor=105 Dim objects1(0)As NXOpen.DisplayableObjectDim theUI As UI = UI.GetUI() objects1(0)=CType(theUI.SelectionManager.GetSelectedObject(0), NXOpen.Face) displayModification1.Apply(objects1) displayModification1.Dispose() EndSubEnd Module