I wanna make a hatchback command

archotect

Usenet Archive
Joined
Jan 22, 2004
Messages
1
Reaction score
0
I would like to make a hatch back command. this function simply puts all hatches to the back of the drawing.

i was looking at the draw order command, but this requires selection of ojects before invoking the command. is there a way to create selection based on wild card criteria (suck as *hatch), then invoke the draworder, then back?

the later part is easy i just have to put the following in a lsp routine: (defun c:vb (command "draworder" "b")), its the pre-selection i am having trouble with.

tia.
 
Try this macro (button). It is not a lisp but works pretty good. Your hatch layers need to begin with"hatch" for it to get them all. The tilemode commands can come out but then it will not work while in paperspace. (On modelspace entities.)

^C^Ctilemode;1;ssx;;la;hatch*;;dr;p;;b;tilemode;0;regenall;
 
A similar Progam to Jeff's, using only on Current TAB

(DeFun C:HBack ( / #PiHat)
(PrompT "(C:HBack) Hatch Back")
(If
(SetQ #PiHat (SSGet "X" (List(Cons 0 "Hatch")(Cons 410 (GetVar "CTab"))))) (VL-Cmdf "DrawOrder" #PiHat "" "B") (Alert "There Are NO Hatch on Current TAB") );If (PrinC)
);DeFun

archotect said:
I would like to make a hatch back command. this function simply puts
all hatches to the back of the drawing.
i was looking at the draw order command, but this requires selection of
ojects before invoking the command. is there a way to create selection based on wild card criteria (suck as *hatch), then invoke the draworder, then back?
the later part is easy i just have to put the following in a lsp
routine: (defun c:vb (command "draworder" "b")), its the pre-selection i am having trouble with.
 
(setq hatch (ssget "x" '((0 . "hatch"))))
(command "draworder" hatch "b")

archotect said:
I would like to make a hatch back command. this function simply puts all
hatches to the back of the drawing.
i was looking at the draw order command, but this requires selection of
ojects before invoking the command. is there a way to create selection based on wild card criteria (suck as *hatch), then invoke the draworder, then back?
the later part is easy i just have to put the following in a lsp routine:
(defun c:vb (command "draworder" "b")), its the pre-selection i am having trouble with.
 
Jesús,
Technically mine only work on the current tab, also. When you get the selection set with (ssget "x"), it may select everything, but if you pass that ss to a (command) call, all entities in the ss that are not in the current tab get filtered out. However, the routine will bomb out if there are hatches in other tabs but none are in the current tab.

Jeff
 
Jeff

Generally I use many tabs, that's why I did it.

I have a cuestion:

Draworder only works on the current drawing, when it is XReferenced, then entities are bad ordered.

¿is there a way on AutoCAD to solve the problem?

Jesús
 
The only way I know is to reverse the draworder in the xref file prior to xrefing, but then that messes up the base drawing. So no, there is no "good" way. ;-(

Jeff
 
Jeff:

I Have a function to order the display

I would like to know your comments about.

I'm architect, not programmer, so I have invester many hours on it.

I will put it on another theme.

JPadilla
 

Latest threads

Back
Top