.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

color bylayer

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
2384 Views, 4 Replies

color bylayer

Hello,

I think I have a very simple problem but i am already trying the whole evening to solve it. I try to change the color of a line to byLayer I tryed the next options:

//lijn1 is an LineObject

lijn1.ColorIndex = 0;
//but then the linecolor is byblock.

I tried
lijn1.Color = Color.FromColorIndex(ColorMethod.ByLayer, 0)
//but then te linecolor is byblock.

How to change the line color to bylayer??

thanks
4 REPLIES 4
Message 2 of 5
Mikko
in reply to: Anonymous

Maybe? Message was edited by: Mikko
Message 3 of 5
Mikko
in reply to: Anonymous

change 0 to 256?
Message 4 of 5
Anonymous
in reply to: Anonymous

ColorIndex = 256;

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

wrote in message news:5762769@discussion.autodesk.com...
Hello,

I think I have a very simple problem but i am already trying the whole evening to solve it. I try to change the color of a line to byLayer I tryed the next options:

//lijn1 is an LineObject

lijn1.ColorIndex = 0;
//but then the linecolor is byblock.

I tried
lijn1.Color = Color.FromColorIndex(ColorMethod.ByLayer, 0)
//but then te linecolor is byblock.

How to change the line color to bylayer??

thanks
Message 5 of 5
Anonymous
in reply to: Anonymous

Yes off course, I thought that 256 was outside the byte-range(0-255),
Ok thanks this works fine.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost