Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

trying to automate draworder

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
154 Views, 3 Replies

trying to automate draworder

I have got this simple lisp so far, but it seems I am not passing the
correct items to the draworder command .

;[code]
(defun c:shadow-glass-layers-to-back ( / ss1 ss2 )
(setq ss1 (ssget "x" '((8 . "shadow"))) )
(command "draworder" ss1 "back" "")
(setq ss2 (ssget "x" '((8 . "win-glz"))) )
(command "draworder" ss2 "back" "")
(princ)

) ; defun

(defun c:sg () (c:shadow-glass-layers-to-back))

;[/code]

The idea is to get the solid hatches on the shadow layer to the back
followed by the solid hatches on the win-glz layer so the shadow lies above
win-glz, but below all else.
Could someone tell me how I pass the items in the selection set to the
draworder command please?

--
Gordon.
3 REPLIES 3
Message 2 of 4
hmsilva
in reply to: Anonymous

Hi Gordon

try this

(defun c:shadow-glass-layers-to-back ( / ss1 ss2 )
(setq ss1 (ssget "x" '((8 . "shadow"))) )
(setq ss2 (ssget "x" '((8 . "win-glz"))) )
(command "draworder" ss1 "" "back" )
(command "draworder" ss2 "" "back" )
(command "regen")
(princ)

) ; defun

(defun c:sg () (c:shadow-glass-layers-to-back))


Cheers

Henrique

EESignature

Message 3 of 4
Anonymous
in reply to: Anonymous

Hi Henrique - thanks for looking at this for me - that is excellent - I
always somehow manage to miss things like the . after the ss has
been passed to the command - or get it in the wrong location and wonder than
about all the rest of the construction and syntax being wrong - still a
novice at this stuff, ha ha.. Thanks very much
--
Gordon


wrote in message news:5683092@discussion.autodesk.com...
Hi Gordon

try this

(defun c:shadow-glass-layers-to-back ( / ss1 ss2 )
(setq ss1 (ssget "x" '((8 . "shadow"))) )
(setq ss2 (ssget "x" '((8 . "win-glz"))) )
(command "draworder" ss1 "" "back" )
(command "draworder" ss2 "" "back" )
(command "regen")
(princ)

) ; defun

(defun c:sg () (c:shadow-glass-layers-to-back))


Cheers

Henrique
Message 4 of 4
hmsilva
in reply to: Anonymous

You're welcome, Gordon.

EESignature

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost