ksperopoulos Posted December 10, 2013 Posted December 10, 2013 I am trying to create a new layer using ENTMAKE but I don't know what I am doing wrong. According to the help manual (which is creating a circle, not a layer), it looks like my code is correct. Any help pointing me in the right direction? (BTW - "layelev" and "laycolr" are variables I have stored earlier in my program.) (entmake ((0 . "LAYER") (100 . "AcDbLayerTableRecord") (2 . layelev) (70 . 0) (62 . laycolr) (6 . "Continuous") (290 . 1) (370 . "0.25") ) ) Quote
BlackBox Posted December 10, 2013 Posted December 10, 2013 (entmake '((0 . "LAYER") (100 . "AcDbSymbolTableRecord") (100 . "AcDbLayerTableRecord") (2 . "[color="red"]YourLayerName[/color]") (62 . 1) (6 . "Continuous") ) ) Quote
ksperopoulos Posted December 10, 2013 Author Posted December 10, 2013 Do you mean I can't use variables that are storing the layer name in this situation? And why the two 100 DXF codes? Quote
jdiala Posted December 10, 2013 Posted December 10, 2013 Do you mean I can't use variables that are storing the layer name in this situation? And why the two 100 DXF codes? Yes you can use variables. Use list and cons instead of quote. (entmake ([color="red"]list[/color] '(0 . "LAYER") '(100 . "AcDbSymbolTableRecord") '(100 . "AcDbLayerTableRecord") ([color="red"]cons[/color] 2 [color="blue"]layelev[/color]) '(70 . 0) ([color="red"]cons[/color] 62 [color="blue"]laycolr[/color]) '(6 . "Continuous") '(290 . 1) '(370 . 25) ) ) Quote
ksperopoulos Posted December 10, 2013 Author Posted December 10, 2013 Thank you for showing me about CONS. I see you have used an apostrophe in your code above. I have seen it in other people's code as well. What does the apostrophe mean? Quote
BlackBox Posted December 10, 2013 Posted December 10, 2013 I see you have used an apostrophe in your code above. I have seen it in other people's code as well. What does the apostrophe mean? As it happens, Lee has kindly saved us from attempting to explain this, as he's just added another nice article: The Apostrophe and the Quote Function Quote
ksperopoulos Posted December 10, 2013 Author Posted December 10, 2013 I seriously doubt I will ever be able to remember all that. I need to add this link to my favorites so I can reference it later. What would we all do without Lee? Now that I have a vague understanding of apostrophe's and CONS, why is there two 100 DXF codes that make this work? When I look at the DXF codes for layers in the help file, it only shows one. Quote
BIGAL Posted December 11, 2013 Posted December 11, 2013 An alternative if your only making a single layer (command "_layer" "n" layelev "C" laycolr "LT" "Continous") 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.