Notifications
Clear all

[Closed] Remove ALL xrefObjects from scene

Hi all

If you go to the XREF Object dialog, I have about 10 files listed there. In each there are thousands of objects. All this is in my scene and I’m having a hard time getting rid of it. I went through each of the 10 files, then at the bottom selected all objects and “Delete XREF Entity”. This worked for 2 of the 10 files, the remaining 8 just does nothing and I cant seem to be able to remove anything further.

So I want to modify this code that removes xref SCENES, to work on the xref OBJECTS.
I’m not having any luck with

[i]objXRefs.getAllXRefObjects()[/i]

The one for the scenes:



local currentXRefScenesIndexArr = #()
for i = xrefs.getXRefFileCount() to 1 by -1 do
(
 append currentXRefScenesIndexArr (xrefs.getXRefFile i).filename
delete (xrefs.getXRefFile i)
) 


3 Replies

What about

delete (for obj in objects where isKindOf obj XRefObject collect obj)
1 Reply
(@morne)
Joined: 10 months ago

Posts: 0

Thanks that did the trick

… or use getclassinstances