Chck into 'visretain' maybe?
Thanks for the suggestion, unfortunately that it was set correctly and didn't affect the result setting it with the opposite value.
@TheRuinner13 wrote:
Chck into 'visretain' maybe?
Visretain controls whether or not layer changes to XRefs are retained.
i.e. You change XRef1|Layer1 so that it's off and XRef1|Layer2 so that it's blue. Do you want those settings to be retained the next time you open the dwg file?
Don Ireland
Engineering Design Technician
@Civil3DReminders_com wrote:
I've modified a lisp routine I found on line. It works great in putting the draw order of objects, mainly sending blocks with hatches to the back, in the correct order. The problem is that if I print from SSM in the same Autocad session it prints correctly, if I exit Autocad and open a new session SSM prints the wrong draw order and the command needs to be run again. HPDRAWORDER and SORTENTS are set to the default values. Is there anything else I should check?
Autocad 2014
I've seen this behavior in the past -- with no lisp routine involved -- and I have yet to notice a pattern as to when it happens vs not. My work around when I run into this as of yet is:
Now I'm left with ONLY the new copies of what was there.
The most recently created items are always "on top" until something else is placed on top of them.
Don Ireland
Engineering Design Technician
Attached is the lisp file being used. Yes, the drawing is being saved after the lisp is run.
Visretain didn't affect the results.
Lee Mac had a dialog box where you could select the order manually from a list of layers. Unfortunately it didn't save the values, so the next time you went in it you'd have to select them again. Since the layers are always the same in my case I hard coded the layer list in the lisp program and when it runs, it does it based on the hard coded list of layers. I tried to contact Lee to get the dialog box to save the values, but unfortunately he didn't respond, even with the offer of money for his time.
The short answer is I removed the dialog box and added this instead:
(setq layers '("CURB" "POST" "CAISSON" "WALLSTEM" "WALLSTRUCT" "FOOTING GREY"))
previously the layers array was set by a dialog box showing a list of layers.
@Civil3DReminders_com wrote:
... The problem is that if I print from SSM in the same Autocad session it prints correctly, if I exit Autocad and open a new session SSM prints the wrong draw order and the command needs to be run again...
..
Without using SSM, just open, run LDOrder, save, close, reopen... the object order remained correct or not?
Henrique
Same result as using SSM, it looses the draw order previoiusly saved.
Could you please open the attached dwg, do a plot preview, and report what you see in the preview.
Henrique
Can you please share a non-confidential sample drawing to demonstrate the behavior ?
That will help reproduce the behavior and log it with our engineering team if needed.
I did not reproduce the behavior in AutoCAD 2014 with two simple overlapping hatches.
The draw order when changed using Lee Mac's code as well as changing it directly in AutoCAD persisted between sessions.
I have attached the sample drawing that i used.
About changing Lee Mac's nice Lisp code to suit your needs :
Have a look at "(action_tile "add"... code
that is the code where the action related to clicking the "add" button is.
The following line :
(_MakeList "layer2" (setq layer2 layers))
should add all the layers to the "layer2" list box and you can have the layers sorted to suit your requirement.
You can also save the sorted order by creating another button (say "Save" button) and saving it to a file.
Have a look at the DCL code to add another button if you need that.
If you are comfortable programming in VB.Net, you can follow this blog post and saving to a file is quite easy
http://adndevblog.typepad.com/autocad/2012/06/changing-the-draw-order-of-the-entity.html
Regards,
Balaji
Can't find what you're looking for? Ask the community or share your knowledge.