Message 1 of 3
Change color of layer IV2008 SP2

Not applicable
12-09-2007
12:45 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
i want to change the color of a existing layer with this code
***********************
Public Sub change_layer_color()
Dim oDrawDoc As DrawingDocument
Set oDrawDoc = ThisApplication.ActiveDocument
Dim oNewLayer As Layer
Set oNewLayer = oDrawDoc.StylesManager.Layers.Item("PDM_STAMP")
oNewLayer.Color.SetColor 255, 0, 0
End Sub
***********************
But nothing happens.
Here is the content of the Local VBA Window.
////////////////////////////////////
- : oNewLayer : : Layer/IRxLayer
: [_Name] : "PDM_STAMP" : String
- : Color : : Color/IRxColor
: Blue : 160 : Byte
: Green : 0 : Byte
: Red : 0 : Byte
******************************
thank's for your help
***********************
Public Sub change_layer_color()
Dim oDrawDoc As DrawingDocument
Set oDrawDoc = ThisApplication.ActiveDocument
Dim oNewLayer As Layer
Set oNewLayer = oDrawDoc.StylesManager.Layers.Item("PDM_STAMP")
oNewLayer.Color.SetColor 255, 0, 0
End Sub
***********************
But nothing happens.
Here is the content of the Local VBA Window.
////////////////////////////////////
- : oNewLayer : : Layer/IRxLayer
: [_Name] : "PDM_STAMP" : String
- : Color : : Color/IRxColor
: Blue : 160 : Byte
: Green : 0 : Byte
: Red : 0 : Byte
******************************
thank's for your help