Autocad 2023. I see answers from 2014 but they do not seem to work. Is there a Lisp routine that can just delete all Solid hatches, solid fills from a drawing. I use fill in my blocks so if I turn it off from the Architects my blocks are no longer relevant also. I would have thought Autodesk would have solved this especially from an Xref point of view. Be great if I could turn off in the base Xreference drawing and it not display in the working drawing.
Solved! Go to Solution.
Solved by paullimapa. Go to Solution.
Simplest would be to have a designated layer used for all the solid fills in your blocks. Then you could just freeze that layer in the xref you don't want to see them in.
@rosst5ZL4H wrote:I would have thought Autodesk would have solved this especially from an Xref point of view.
The tool for doing this is usually the layer manager or possibly editing the XREF file. We've been doing it for decades. XREFs have their own unique set of layers for setting the properties.. Maybe you having difficulty because the XREF is using more than one layer for the fills?
It's not my blocks that are the issue. I do not want to turn off the fills in my blocks. It's the fill in the Architects drawing that I have as an Xref.
could you share a sample of the architects drawings and point out which of the solid fill hatch patterns you want removed?
Yes I'm aware of the Xref layers, been using CAD since 1986 starting with McDonald Douglas GDS. The supplied drawing by the Architect has all the bench equipment and the Fills on one layer. So only way to remove the Fill is by turning it off. However I also have to turn it off in the Xref Fill > Off. Not a chosen layer. I can't clumsily go around deleting it as it also deletes the bench tops even though I have "Burst" and also "Exploded" the drawing. I suspect it was drawn in something other than Autocad. Command Fill Off works but it also turns off fills in my blocks. I've tried Visretain but that also does not work.
Morning, I have shared the drawing. In terms of Fill it's all "Fill" I would like to remove/delete.
Thanks
The reason why what you tried didn't work because these are not HATCH objects with a SOLID pattern.
But instead they're actually 2d SOLIDS. You can tell by selecting and editing one of the blocks that has these solid fills. Then in the block editor select the fill object and the Properties window will show that it's a SOLID or you can run the LIST command on it and the same result occurs:
2d SOLIDS were the old way of filling in an area prior to AutoCAD's introduction of the SOLID Hatch pattern.
Attached is a compressed file containing 3 lisp functions:
DelSol is specifically for deleting 2d SOLIDS only which works on the sample drawing you posted.
DelSolHat is specifically for deleting Hatch with Solid patterns (you probably found and tried this already)
DelObjType has the option of deleting various objects like:
(DelObjType "solid") ; deletes all 2d SOLIDS
(DelObjType "hatch") ; deletes all Hatches with no option to specify solid pattern
Worked an absolute treat. Thank you so very much for your time and knowledge.
glad to have helped...cheers!!!
Can't find what you're looking for? Ask the community or share your knowledge.