firavolla Posted June 29, 2010 Posted June 29, 2010 Simple question. What I want is when the user clicks a button, a macro will execute some vba code and check if the current drawing has/has not some layers in it...like layerA, layerB, layerC. If the drawing does not have those layers, then create them for the current drawing. Any help?Advice? Thank you. Quote
firavolla Posted June 29, 2010 Author Posted June 29, 2010 Ok...So I've managed to do that...But the question now is how to set the color of the linetype of the layer? It's something like ThisDrawing.Layers.Item(counter).TrueColor=?????? Quote
SEANT Posted June 29, 2010 Posted June 29, 2010 I believe AutoCAD 2004 has the older .color property still avaialble, though not listed in the help files. The newer .TrueColor can be modified by first creating the object: Set color = AcadApplication.GetInterfaceObject("AutoCAD.AcCmColor.16") then modifying the properties accordingly: Call color.SetRGB(80, 100, 244) finally: ThisDrawing.Layers.Item(counter).TrueColor = color Code taken from the Developer Documentation Examples Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.