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

Change entity color & linetype problem.

6 REPLIES 6
Reply
Message 1 of 7
sgsawdy
2369 Views, 6 Replies

Change entity color & linetype problem.

I am using ACADE 2008 and VB.NET. I have a multitude of drawings that I am doing the same three and four operations on and would like to write VB.NET program to do it. I can get my selections set just fine, but my first problem is figuring out how to change all drawing entities color and linetype to "ByLayer". So far I have not gotten past changing just the color value. I have tried multiple variations on the following line without success:

myAcadEnt.Color = Colors.Color.FromDictionaryName("ByLayer")

Can anybody get me pointed in the right direction? I am grateful for any help.

Scott
6 REPLIES 6
Message 2 of 7
NathTay
in reply to: sgsawdy


myAcadEnt.ColorIndex = 256

Message 3 of 7
Dale.Bartlett
in reply to: sgsawdy

Is there a similar value for the LinetypeId as for layers to reset to BYLAYER?

ent.ColorIndex = 256; /BYLAYER

// ent.LinetypeId = ???; //BYLAYER

rather than doing this:

ent.Linetype = "BYLAYER";

Dale




______________
Yes, I'm Satoshi.
Message 4 of 7
Balaji_Ram
in reply to: Dale.Bartlett

Hello Dale,

 

"Database.ByLayerLineType" property will give you the ObjectId of the "ByLayer" line type.



Balaji
Developer Technical Services
Autodesk Developer Network

Message 5 of 7
Dale.Bartlett
in reply to: sgsawdy

That's correct. But what I want to know is what is the LinetypeID eqivalent of "BYLAYER"?. Thanks for hte reply, Dale




______________
Yes, I'm Satoshi.
Message 6 of 7
fieldguy
in reply to: Dale.Bartlett

Something like this -

ent.linetype = db.ByLayerLinetype

 

Message 7 of 7


@dbartlett wrote:

That's correct. But what I want to know is what is the LinetypeID eqivalent of "BYLAYER"?. Thanks for hte reply, Dale


 

Balaji told you - it is returned by the property he mentioned, and it must be assigned to the entity's LinetypeId property (as opposed to the Linetype property)

 

 

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