Code:
Language="VBSCRIPT"'--------------------------------------------------------------------------------------------------
' =================================================================================================
' NOMBRE MACRO: Cambiar_color_MULTICOLOR_RGB-gris_STD_V1.CATScript
'
' Versión: V 1.0 Febrero 2013
'
' PROPUESTA: Esta macro cambia los colores Aritex Azul RGB (23,71,133), Gris ARITEX RGB (169,178,173)
' Verde claro RGB (0,255,0), Verde oscuro RGB (0,128,64), Amarillo RGB (244,226,90) y
' Blanco RGB (255,255,255) a color gris STD-CATIA RGB (210,210,255).
' OBSERVACIONES:
'
' MODO DE EMPLEO: Ejecución directa con un click.
'
' CATIA Level: V5R18
'
' Autor: Creado por M. de los Heros, DH&D, s.l.
' =================================================================================================
'--------------------------------------------------------------------------------------------------
'------------------------------------------------------------------------
' Procedimiento CATMain
'------------------------------------------------------------------------
' Seleccionar todo lo que esta en colores
' y pasarlo al color Gris STD CATIA (210,210,255)
' ------------------------------------------------------------------------
Sub CATMain()
'------------------------------------------------------------------------
' Alles selektieren, dessen Farbe (23,71,133), (169,178,173),
' (0,255,0), (0,128,64), (244,226,90), und/oder (255,255,255)
'------------------------------------------------------------------------
On Error GoTo 0
Dim selection1 As Object
'Color Azul RGB (23,71,133)
Set selection1 = CATIA.ActiveDocument.selection
selection1.Search "Color='(23,71,133)',all"
'Color Gris ARITEX RGB (169,178,173)
Set selection1 = CATIA.ActiveDocument.selection
selection1.Search "Color='(169,178,173)',all"
'Color Verde claro RGB (0,255,0)
Set selection1 = CATIA.ActiveDocument.selection
selection1.Search "Color='(0,255,0)',all"
'Color Verde oscuro RGB (0,128,64)
Set selection1 = CATIA.ActiveDocument.selection
selection1.Search "Color='(0,128,24)',all"
'Color Amarillo RGB (244,226,90)
Set selection1 = CATIA.ActiveDocument.selection
selection1.Search "Color='(244,226,90)',all"
'Color Blanco RGB (255,255,255)
Set selection1 = CATIA.ActiveDocument.selection
selection1.Search "Color='(169,178,173)',all"
'------------------------------------------------------------------------
' Aktuelle Farbe in Grau STD CATIA (210,210,255) ändern
'------------------------------------------------------------------------
Dim visPropertySet1 As VisPropertySet
Set visPropertySet1 = selection1.VisProperties
visPropertySet1.SetRealColor 210,210,255,1
End Sub