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

Delete Fill from drawing not just turn off

10 REPLIES 10
SOLVED
Reply
Message 1 of 11
rosst5ZL4H
773 Views, 10 Replies

Delete Fill from drawing not just turn off

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.

10 REPLIES 10
Message 2 of 11
TomBeauford
in reply to: rosst5ZL4H

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.

64bit AutoCAD Map & Civil 3D 2023
Architecture Engineering & Construction Collection
2023
Windows 10 Dell i7-12850HX 2.1 Ghz 12GB NVIDIA RTX A3000 12GB Graphics Adapter
Message 3 of 11
RSomppi
in reply to: rosst5ZL4H


@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?

Message 4 of 11
rosst5ZL4H
in reply to: TomBeauford

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.

Message 5 of 11
paullimapa
in reply to: rosst5ZL4H

could you share a sample of the architects drawings and point out which of the solid fill hatch patterns you want removed?


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 6 of 11
rosst5ZL4H
in reply to: RSomppi

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. 

Message 7 of 11
rosst5ZL4H
in reply to: paullimapa

DWG attached. Fingers crossed.

Message 8 of 11
rosst5ZL4H
in reply to: paullimapa

Morning, I have shared the drawing. In terms of Fill it's all "Fill" I would like to remove/delete.

 

Thanks

Message 9 of 11
paullimapa
in reply to: rosst5ZL4H

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:

paullimapa_0-1722817223094.png

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


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 10 of 11
rosst5ZL4H
in reply to: rosst5ZL4H

Worked an absolute treat. Thank you so very much for your time and knowledge.

Message 11 of 11
paullimapa
in reply to: rosst5ZL4H

glad to have helped...cheers!!!


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos

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

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report