It looks like you're new here. If you want to get involved, click one of these buttons!
Hello,
I find the custom queries in the Search and Replace function extremely useful. Is there way to flatten instances (1 to multiple hierarchy levels) once they are found from using Search and Replace?
Thanks,
Dan
Comments
Hi Dan,
You can try this ("via" is that name pattern I picked):
But there is no warranty this works properly. There are too many interactions and manipulation of the hierarchy tree during the query isn't supported well. There is too much potential interference between the query and hierarchy manipulations.
If this fails, you can basically use queries to tag instances with user properties:
After this, it's a matter of a short script to flatten these tagged instances:
You can also use "flatten" without the "1" argument for "all levels", but you risk to flatten away an instances with itself are flagged. Avoiding this case is difficult.
Matthias
Matthais,
Thank you for the help!
You were correct, flattening from search and replace would skip over some instances.
Tagging the instances then flattening from the script worked great!
Thanks again,
Dan