TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: b_alexx on August 28, 2019, 09:57:33 AM
-
I would like to ask if it is possible to rename the layer names in dwg adding also line thickness (0.05, 0.18 etc.) and color number (10, 20, (240,212,230) 56 etc.. )
Example : Wall To Wall_0.05_250
Water To Water _0.18_200_220_160
Thank you.
-
What shoud be done with layers with 'default' lineweight?
-
Try this:
"_"
"Default"
)
"_"
)
)
)
)
)
-
WOW!!!! Amazing!
Thank you very much.
-
Would it be possible to add the pen number associated with the layer color to the layer name as well?
Example : if the layer color is 2, the pen is 7
if the layer color is 5 the pen is 7
if the layer color is 240,240, 240 the pen is object color
etc....
I think it's very complicated and thanks again for the help.
-
There are all kinds of properties we can append to the layername. Why are you doing this?
_$
; IAcadLayer: A logical grouping of data, similar to transparent acetate overlays on a drawing
; Property values:
; Application (RO) = #<VLA-OBJECT IAcadApplication 00007ff68ad32ec0>
; Description = ""
; Document (RO) = #<VLA-OBJECT IAcadDocument 0000024c76760b08>
; Freeze = 0
; Handle (RO) = "6"
; HasExtensionDictionary (RO) = 0
; LayerOn = -1
; Linetype = "Continuous"
; Lineweight = -3
; Lock = 0
; Material = "Global"
; Name = "0"
; ObjectID (RO) = 42
; ObjectName (RO) = "AcDbLayerTableRecord"
; OwnerID (RO) = 43
; PlotStyleName = "Color_254"
; Plottable = -1
; TrueColor = #<VLA-OBJECT IAcadAcCmColor 0000024c76497480>
; Used (RO) = -1
; ViewportDefault = 0
; Methods supported:
; Delete ()
; GetExtensionDictionary ()
; GetXData (3)
; SetXData (2)
T
; 1 form loaded from #<editor "<Untitled-0> loading...">
_$
-
Hi.
Your question is right.
My client wants the layer names to be the same for similar objects but they are on different layers depending on the phase (!).
example : Water_18A_7 (Existing water)
Water_18A_251 (Planned water)
Water_18A_254 (Probable water)
Water_etc....
The template has more than 400 layers.
The last number is not the color of the layer but the printing pen associated with the color.
In the properties that you have attached to the post I do not see (and maybe it is not possible) to attach to the file name the number of the printing pen.
I know it's very complicated.
Thank you so much for your interest.
-
You can have the layer one color but plot a different color we had our ctb set up that way the 1st seven colors were black various thickness. So if you want red to = green just make a new client.ctb that matches the requirement. Note you can have only 1 color setting per color. The other thing is you can have the layout totally different colors to the model. Vey confusing.