Change backgroud color
Change backgroud color
(OP)
Hello,
Does anyone know name of function to change background color of work part? I have many parts with background I don't like, so I wanna write journal to change them automatically.
Does anyone know name of function to change background color of work part? I have many parts with background I don't like, so I wanna write journal to change them automatically.
With best regards
Michael





RE: Change backgroud color
CODE
Mike Hyde
www.astonmartin.com
NX8.5 with TC9.1
Moving to NX10 with TC11.2
RE: Change backgroud color
NX 7.5 64bit
NX 9.0.3.4 MP4 64bit
NX 10.0.3.5 MP3 64bit
www.studiotreccani.com
RE: Change backgroud color
but it only change color for plain background. I wanna change also for graduated.
I have found this class, but I dont know how to use it to work.
CODE
With best regards
Michael
RE: Change backgroud color
1)Open a part file in which you like the color settings.
2) Open the "Roles palette"
3) RMB in the "whitespace" in the roles palette, -"new palette". The result is a new , empty, palette.
4) in the new palette : RMB- New entry - Visualization template, a new dialog will open, DESELECT all options except the "backgrounds".
IF you enable all options in this dialog, the visualization template will push ALL these settings into your next part, include current zoom/rotation etc.
also note that you can change the colors in this dialog.
OK
5) open the part where you like to change the background. Click the visualization template. Done. ( even simpler than running a program
Regards,
Tomas
RE: Change backgroud color
Your method is simpler than select preferences - background - default. But I have many files - about 100 or more, so I wanted create journal to process whole directory for me :).
With best regards
Michael
RE: Change backgroud color
www.nxjournaling.com
RE: Change backgroud color
With best regards
Michael
RE: Change backgroud color
This process does not capture the preferences set for Drafting.. is there similar way to save the preferences ( color and arrow head / font style etc) ?
RE: Change backgroud color
But now I will try Toost visualization template. I always wanted too, so thanks
CSBK
RE: Change backgroud color
CODE
Option Strict Off Imports System Imports NXOpen Imports NXOpen.UF Module Module1 Dim theSession As Session = Session.GetSession() Dim ufs As UFSession = UFSession.GetUFSession() Dim workPart As Part = theSession.Parts.Work Dim rgb1(2) As Double Dim rgb2(2) As Double Sub Main() If IsNothing(theSession.Parts.BaseWork) Then 'active part required Return End If Dim workPart As Part = theSession.Parts.Work Dim lw As ListingWindow = theSession.ListingWindow lw.Open() rgb1(0) = Math.Round(35.0/255.0, 7) rgb1(1) = Math.Round(35.0/255.0, 7) rgb1(2) = Math.Round(75.0/255.0, 7) ufs.Disp.SetColor(UFConstants.UF_DISP_BACKGROUND_COLOR, UFConstants.UF_DISP_rgb_model, "", rgb1) ufs.Disp.LoadColorTable() End Sub Public Function GetUnloadOption(ByVal dummy As String) As Integer 'Unloads the image immediately after execution within NX GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Immediately End Function End ModuleWith best regards
Michael