Xref Scene filter in layer/object explorers

Xref Scene filter in layer/object explorers

tbusseyA33GU
Observer Observer
142 Views
4 Replies
Message 1 of 5

Xref Scene filter in layer/object explorers

tbusseyA33GU
Observer
Observer

Is there any way to filter out xref scene objects from the layer/object explorers?


They don't seem to respect the xref filter (I'm assuming this only works on xref objects, not xref scenes)

0 Likes
Accepted solutions (1)
143 Views
4 Replies
Replies (4)
Message 2 of 5

A娘
Advocate
Advocate
Accepted solution

add a custom filter property when needed

global xrefobjectsel=#()
global AEI_objlayer_sel_delay = timestamp()
fn travelnode o =
(
	tempsel= for oo in o.children collect oo
	for oo in o.children do
		if oo.children.count > 0 do 
			join tempsel (travelnode oo)
	tempsel
)
fn refreshxref =
(
	xrefobjectsel=#()
	count=xrefs.getXRefFileCount()
	if count == 0 then
	 	return 0
	else
		for i = 1 to count do 
		(
			aXref=xrefs.getXRefFile i
			xrefsel = for o in aXref.tree.children collect o
			for o in xrefsel where o.children.count > 0 do 
				join xrefsel (travelnode o)
			append xrefobjectsel xrefsel
		)
	AEI_objlayer_sel_delay = timestamp()
)
fn getxrefindex theNode = 
(
	if timestamp() - AEI_objlayer_sel_delay > 5000 do
		refreshxref()
	if xrefobjectsel.count == 0 then
		return 0
	else
	for i = 1 to xrefobjectsel.count do 
	(
		if finditem xrefobjectsel[i] thenode do 
			return i
	)
	0
)
SceneExplorerManager.addReadOnlyProperty "xrefindex" getxrefindex

run script above , there will be a new filter called xrefindex added to list , active advanced filter and add rule xrefindex with 0 , xref scene objects will be removed , rule with 1 , only objects in 1st xref file shows
when add xref scene , layer explorer should be closed or not add xrefindex column or rule

0 Likes
Message 3 of 5

haifeng_yuSEVKN
Autodesk
Autodesk

hello @tbusseyA33GU, thanks very much for the information. I noticed that it seems like we are not able to filter out Xref scene objects from the layer/object explorers. However, we can load/unload the objects in Xref Scene editor. May I ask how you would like to fiter out the Xref objects in the explorers? Are you trying to hide/unhide objects or move them to certain layers? Thank you!



Haifeng Yu
Technical Support Specialist
0 Likes
Message 4 of 5

joaquim.moral
Community Manager
Community Manager

Hi @tbusseyA33GU,

Could you kindly confirm that you followed our colleague @haifeng_yuSEVKN's instructions? That way, we could help you more effectively.

 

Thanks!


You found a post helpful? Then feel free to give likes to these posts!
Your question got successfully answered? Then just click on the 'Mark as solution'

¿Te ha parecido útil este post? ¡Deja un like!
¿Tu pregunta ha sido solucionada? Selecciona 'Marcar como solución' y ayuda a las demás a encontrar fácilmente la información.


Joaquim Moral
Senior Community Manager

0 Likes
Message 5 of 5

haifeng_yuSEVKN
Autodesk
Autodesk

hell @tbusseyA33GU, thank you for posting the question about Xref Scene filter in layer/object explorers. I assume that you may need a bit of time to work on this issue, please feel free to find if the information provided is beneficial to you. Also, you could try using the suggestion provided by @A娘. Thank you @A娘 for sharing additional information.



Haifeng Yu
Technical Support Specialist
0 Likes