- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
Before we make exports to PDF we need to change the line color of objects using the following code and this works perfect:
{
Dim oDrawDoc As DrawingDocument
Set oDrawDoc = ThisApplication.ActiveDocument
Dim oLayer As Layer
Set oLayer = oDrawDoc.StylesManager.Layers.Item("HIS_0")
oLayer.Color = ThisApplication.TransientObjects.CreateColor(0, 0, 0)
}
(This is used for about 20 different layers)
The only problem is that in some inventor drawings, the color of some specific objects isn't referenced to a layer with the "By Layer" option. So if we change the layer color the color of the object stays the same.
Is there any code in VBA available to change the color of the object (e.g. Dimensions or Hatch or anything) to "By Layer"? So it looks like this:
(We have thousands of drawings so therefore it is no option to do it by hand.)
Thanks in advance!
Solved! Go to Solution.