<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Color conversion tool? in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/color-conversion-tool/m-p/1169722#M48725</link>
    <description>Hi,

This may not work in 2004 based drawings.

You need to look at the new colouring system. for 2004 based drawings. 
There is good sample code in the help files.

-- 

Regards,


Laurie Comerford
www.cadapps.com.au

"terencechatfielduk" &lt;NOSPAM&gt; wrote in message 
news:12059774.1098992428865.JavaMail.jive@jiveforum1.autodesk.com...
&amp;gt; Layers have a colour property, which can easily be amended via VBA. You 
&amp;gt; could go through the layer collection using a simple routine along the 
&amp;gt; lines of
&amp;gt;
&amp;gt; public sub changelayercolour()
&amp;gt;
&amp;gt; dim layers as acadlayers
&amp;gt; dim layer as acadlayer
&amp;gt; dim colour as acColor
&amp;gt;
&amp;gt; set layers = thisdrawing.layers
&amp;gt;
&amp;gt; For each layer in layers
&amp;gt; colour = layer.color
&amp;gt; select case colour
&amp;gt; case = acYellow then
&amp;gt; layer.color = acWhite
&amp;gt; case = ......
&amp;gt; end select
&amp;gt; next
&amp;gt;
&amp;gt; end sub
&amp;gt;
&amp;gt; This is off the top of my head and without looking at the help so there 
&amp;gt; are likely to be mistakes, so I would suggest looking at the ActiveX/VBA 
&amp;gt; help as well.&lt;/NOSPAM&gt;</description>
    <pubDate>Thu, 28 Oct 2004 22:57:48 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2004-10-28T22:57:48Z</dc:date>
    <item>
      <title>Color conversion tool?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/color-conversion-tool/m-p/1169719#M48722</link>
      <description>Is there a tool or easy methodology for converting a certain layer color to
another color choice?

We have had to change our pen settings to adapt more closely with NCS
guidance and have legacy drawings which utilize colors with new weights.

I need something which says "color 256 become color 8" etc I have about 15
colors which were affected:

8830 pen setting                       510 pen setting

11                                             8

14                                             31

15                                             8

17                                             8

21                                             8

25                                             38

30                                             8

53                                             8

62                                             8

81                                             8

82                                             8

122                                           8

126                                           8

153                                           8

164                                           8

211                                           118

I am only concerned about "bylayer" color choices - if that matters.

-- 
Thank you in advance,

Paul S. Sheehan, CD, Assoc. AIA
CAD Systems Manager

CMSS Architects, PC
4505 Columbus Street, Suite 100
Virginia Beach, Virginia 23462

Voice: 757.222.2010
Fax: 757.222.2022

www.cmssarchitects.com</description>
      <pubDate>Thu, 28 Oct 2004 11:42:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/color-conversion-tool/m-p/1169719#M48722</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-10-28T11:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: Color conversion tool?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/color-conversion-tool/m-p/1169720#M48723</link>
      <description>You're posting to the wrong ng, Paul. This should be in basic AutoCAD. If
everything now is bylayer, either change the layer's colors, generate a new
ctb file, use the CAD Standards components, etc. Nothing in your post
suggests that you need a programming task. 

-- Mike
___________________________
Mike Tuersley
CADalyst's CAD Clinic
Rand IMAGINiT Technologies
___________________________
the trick is to realize that there is no spoon...</description>
      <pubDate>Thu, 28 Oct 2004 12:58:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/color-conversion-tool/m-p/1169720#M48723</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-10-28T12:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: Color conversion tool?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/color-conversion-tool/m-p/1169721#M48724</link>
      <description>Layers have a colour property, which can easily be amended via VBA. You could go through the layer collection using a simple routine along the lines of &lt;BR /&gt;
&lt;BR /&gt;
public sub changelayercolour()&lt;BR /&gt;
&lt;BR /&gt;
dim layers as acadlayers&lt;BR /&gt;
dim layer as acadlayer&lt;BR /&gt;
dim colour as acColor&lt;BR /&gt;
&lt;BR /&gt;
set layers = thisdrawing.layers&lt;BR /&gt;
&lt;BR /&gt;
For each layer in layers&lt;BR /&gt;
colour = layer.color&lt;BR /&gt;
select case colour&lt;BR /&gt;
case = acYellow then&lt;BR /&gt;
layer.color = acWhite&lt;BR /&gt;
case = ......&lt;BR /&gt;
end select&lt;BR /&gt;
next&lt;BR /&gt;
&lt;BR /&gt;
end sub&lt;BR /&gt;
&lt;BR /&gt;
This is off the top of my head and without looking at the help so there are likely to be mistakes, so I would suggest looking at the ActiveX/VBA help as well.</description>
      <pubDate>Thu, 28 Oct 2004 19:39:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/color-conversion-tool/m-p/1169721#M48724</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-10-28T19:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: Color conversion tool?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/color-conversion-tool/m-p/1169722#M48725</link>
      <description>Hi,

This may not work in 2004 based drawings.

You need to look at the new colouring system. for 2004 based drawings. 
There is good sample code in the help files.

-- 

Regards,


Laurie Comerford
www.cadapps.com.au

"terencechatfielduk" &lt;NOSPAM&gt; wrote in message 
news:12059774.1098992428865.JavaMail.jive@jiveforum1.autodesk.com...
&amp;gt; Layers have a colour property, which can easily be amended via VBA. You 
&amp;gt; could go through the layer collection using a simple routine along the 
&amp;gt; lines of
&amp;gt;
&amp;gt; public sub changelayercolour()
&amp;gt;
&amp;gt; dim layers as acadlayers
&amp;gt; dim layer as acadlayer
&amp;gt; dim colour as acColor
&amp;gt;
&amp;gt; set layers = thisdrawing.layers
&amp;gt;
&amp;gt; For each layer in layers
&amp;gt; colour = layer.color
&amp;gt; select case colour
&amp;gt; case = acYellow then
&amp;gt; layer.color = acWhite
&amp;gt; case = ......
&amp;gt; end select
&amp;gt; next
&amp;gt;
&amp;gt; end sub
&amp;gt;
&amp;gt; This is off the top of my head and without looking at the help so there 
&amp;gt; are likely to be mistakes, so I would suggest looking at the ActiveX/VBA 
&amp;gt; help as well.&lt;/NOSPAM&gt;</description>
      <pubDate>Thu, 28 Oct 2004 22:57:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/color-conversion-tool/m-p/1169722#M48725</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-10-28T22:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: Color conversion tool?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/color-conversion-tool/m-p/1169723#M48726</link>
      <description>Correct Laurie, 2004 is different.  I'd only just been looking yesterday at something colour related for 2005, and that was what was in my head without considerations of any differences. The original post didn't specify so hopefully it will be of some help anyway.&lt;BR /&gt;
&lt;BR /&gt;
Tested example routine for 2005 only follows, amended to fix the bugs.&lt;BR /&gt;
&lt;BR /&gt;
Public Sub changelayercolour()&lt;BR /&gt;
&lt;BR /&gt;
Dim layers As AcadLayers&lt;BR /&gt;
Dim layer As AcadLayer&lt;BR /&gt;
Dim colour As AcColor&lt;BR /&gt;
&lt;BR /&gt;
Set layers = ThisDrawing.layers&lt;BR /&gt;
&lt;BR /&gt;
For Each layer In layers&lt;BR /&gt;
colour = layer.color&lt;BR /&gt;
Select Case colour&lt;BR /&gt;
Case acYellow&lt;BR /&gt;
layer.color = acWhite&lt;BR /&gt;
Case acCyan&lt;BR /&gt;
layer.color = acBlue&lt;BR /&gt;
End Select&lt;BR /&gt;
Next&lt;BR /&gt;
&lt;BR /&gt;
End Sub</description>
      <pubDate>Fri, 29 Oct 2004 12:56:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/color-conversion-tool/m-p/1169723#M48726</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-10-29T12:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: Color conversion tool?</title>
      <link>https://forums.autodesk.com/t5/vba-forum/color-conversion-tool/m-p/1169724#M48727</link>
      <description>I forgot to mention that I am in ADT 2004.

Thanks for pointing out the differences.


"Laurie Comerford" &lt;LAURIE.COMERFORD at="" i="" hate="" spam.com.au=""&gt; wrote in message
news:418179bf$1_3@newsprd01...
&amp;gt; Hi,
&amp;gt;
&amp;gt; This may not work in 2004 based drawings.
&amp;gt;
&amp;gt; You need to look at the new colouring system. for 2004 based drawings.
&amp;gt; There is good sample code in the help files.
&amp;gt;
&amp;gt; -- 
&amp;gt;
&amp;gt; Regards,
&amp;gt;
&amp;gt;
&amp;gt; Laurie Comerford
&amp;gt; www.cadapps.com.au
&amp;gt;
&amp;gt; "terencechatfielduk" &lt;NOSPAM&gt; wrote in message
&amp;gt; news:12059774.1098992428865.JavaMail.jive@jiveforum1.autodesk.com...
&amp;gt; &amp;gt; Layers have a colour property, which can easily be amended via VBA. You
&amp;gt; &amp;gt; could go through the layer collection using a simple routine along the
&amp;gt; &amp;gt; lines of
&amp;gt; &amp;gt;
&amp;gt; &amp;gt; public sub changelayercolour()
&amp;gt; &amp;gt;
&amp;gt; &amp;gt; dim layers as acadlayers
&amp;gt; &amp;gt; dim layer as acadlayer
&amp;gt; &amp;gt; dim colour as acColor
&amp;gt; &amp;gt;
&amp;gt; &amp;gt; set layers = thisdrawing.layers
&amp;gt; &amp;gt;
&amp;gt; &amp;gt; For each layer in layers
&amp;gt; &amp;gt; colour = layer.color
&amp;gt; &amp;gt; select case colour
&amp;gt; &amp;gt; case = acYellow then
&amp;gt; &amp;gt; layer.color = acWhite
&amp;gt; &amp;gt; case = ......
&amp;gt; &amp;gt; end select
&amp;gt; &amp;gt; next
&amp;gt; &amp;gt;
&amp;gt; &amp;gt; end sub
&amp;gt; &amp;gt;
&amp;gt; &amp;gt; This is off the top of my head and without looking at the help so there
&amp;gt; &amp;gt; are likely to be mistakes, so I would suggest looking at the ActiveX/VBA
&amp;gt; &amp;gt; help as well.
&amp;gt;
&amp;gt;&lt;/NOSPAM&gt;&lt;/LAURIE.COMERFORD&gt;</description>
      <pubDate>Fri, 29 Oct 2004 17:53:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/color-conversion-tool/m-p/1169724#M48727</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-10-29T17:53:31Z</dc:date>
    </item>
  </channel>
</rss>

