I am working on a macro that will put all my entities in a drawing color to bylayer. Here is my code so far and it works but I have to select each entity one at a time.
How would I use ssget to accomplish this task? (ssget "x")
I am having trouble understanding how to use ssget.
Question #2
(subst (cons 62 256)(assoc 62 oldData)oldData) from my above code.
I don't 100% understand how this works. Why do I use oldData at the end of this function? Why do I have to call oldData twice? Can someone explain what each oldData is doing?
Question #3
My ultimate goal is to be able to put all entities in a drawing plotstyle to bylayer. This seems to be a much bigger task from what I am reading.
Is there not a DXF code for plot syle? How do I access the plotsyles to modify it. Seems it is a vl functions but I am not at that level of understanding LISP yet, so how was it accomplished before Visual Lisp done in "vanilla LISP"?
this might be a shortcut
(command "change" "all" "" "properties" "color" "bylayer" "")
draw backs are:
if you are in model space it will only change those objects
if you are in paper space it will only chanf that tab
if you want to change all objexts in model and paper you need to use ssget "x" then use a while loop with ssname
= the item you want to replace the old with.
= the old item you want to replace with new (you don't know it, so you must call it from the list)
= the list you want to edit.
It sounds so straight forward the way you put it, I could not find a good example to explain it to me in a way that I could get my head around it.
Not to be greedy here but...
From my understanding so far... If I want to get information about an element I have to use (entsel) & (entget) together. Where (entsel) allows me to select the element and (entget) pull the information from the element. (DxF codes)
But (ssget) seems to work differently.
(ssget) seems to work as a selection/filter tool. Where I have to provide (ssget) a dot list to work from. So if I used (ssget "x") this would put all my drawing elements into a selection set. But it seems I have to specify what I want to work with from the selection set, example: (0 . "Line") or (8 . 256)
I can't use this selection set on multiple object such as "line" & "circles", I have to choose one or the other.
Am I on the right track or is there more to ssget?