*** Posted from RemarQ - http://www.remarq.com - Discussions Start Here (tm) ***
for the first problem
>> I have figured out that after solid hatching the areas of interest in a
drawing I need to use the Draworder
>> command to set the pattern "Back" or "Under" so I can see and plot the
boundary lines not to mention any
>> lines inside the pattern when using the fill as a screened color.
Regenerating the drawing after opening or after
>> some operation will put lines and patterns back in their place.
try this one
;**************************************************************
; Hatch poylines with solids and copy boundary on top
; cammand 'SOL'
(defun p2s ()
(command "schraff" "solid" fill_sol "")
(command "_copy" "_p" "" "0,0" "0,0")
(command "_erase" "_p" "")
(setvar "cmdecho" 1)
)
; Ausgewählte Polylinien mit Solid schraffieren
(defun c:sol ()
(princ "\nSelect poplylines: ")
(setq pls (ssget ' ((0 . "POLYLINE"))))
(if pls
(progn
(setq c# (sslength pls) count 0)
(repeat c#
(setq fill_sol (ssname pls count))
(setq fillList (entget fill_sol))
(p2s)
(setq count (1+ count))
)
)
)
(princ)
)
(prompt "\nHatching selected polylines with solids")
(prompt "\nBoundary will be copied to top -> Call SOL")
(princ)
;******************************************************
If you want to create blocks from filled boundaries you better do not sort.
Then the solid will be the first element chosen for the block, the boundary
second.
>> The problem I have is when I use said drawing as a block inserted into
another drawing the block comes in with
>> the patterns not in their appropriate places (as far as I'm concerned ),
and no amount of regens solves the
>> problem. All I've been able to do is explode the drawing after insertion
and redo the Draworder command.
Thomas Proppe
> The problem I have is when I use said drawing as a block inserted ...
Your problem is closely related to the same problem with XREF
attachments. The root problem is that AutoCAD's DrawOrder does not
actually change the order of the objects in the drawing database.
You could try copying the objects in-place and erasing the originals,
that will bring them to the top, or you can follow the advice as
described in the AutoCAD help file, as below.
---------------- BEGIN AUTOCAD HELP --------------------
Using Xref Files and DRAWORDER
If you reference a drawing that has an attached image or other objects
that have been edited with the DRAWORDER command, the draw order within
the xref will not be in the correct draw order even after regenerating
the drawing. To correct this problem, use the following procedure:
1. Open the xref file.
2. Use the DRAWORDER command to set up the xref drawing.
3. Use the WBLOCK command to create a new drawing from the xref file.
Enter all when prompted to select objects.
4. Use the XATTACH command to attach the file created using WBLOCK in
step 2.
----------------- END AUTOCAD HELP ---------------------
However, consider this user comment:
"I messed with draworder for 5 hours trying to get a very complex
drawing with XREFs & wipeouts to plot correctly and failed. I used
ToolPac's Z order routine and it was plotted in under ten minutes. The
major difference between Z-order and draworder is that ToolPac's z-order
works!"
Follow the URL below to find out more.
Thanks, Terry
o-------------------------------------------o
| ToolPac 4.0, a 400+ function collection |
| of Power Tools for all AutoCAD users. |
| Visit http://www.dotsoft.com for details. |
o-------------------------------------------o
(command "schraff" "solid" fill_sol "")
should be
(command "_hatch" "_solid" fill_sol "")
Thomas Proppe
Trey