I am using list~>cells ~>name to get the cell list.This cell list gives the whole list of cells coming from one library. I would like to exclude few cells coming from category in this library.How to get the cell list with specific categories or by excluding specific category cells.
You'll need to use the ddCat* functions - for example, ddCatOpen or ddCatFindCat, then ddCatGetCatMembers, and ddCatClose to close it.
Hello Andrew , Thanks for the reply. I have two list
first , List1=lib ~>cells~>name
second, coming from the category which i would like to exclude List2=mapcar('car ddCatGetCatMembers( catId) )
I have already tried using remd to exclude List2 from List1. I am not sure if it is the right approach to do it.
The simple solution would be to do:
List3=setof(cell List1 !member(cell List2))
There's a potential risk of performance if the number of cells in List2 is very large. If it is, you could do:
catMembers=makeTable('catMembers nil)foreach(cell List2 catMembers[cell]=t)List3=setof(cell List1 !catMembers[cell])
Normally when I want to know the differences between two lists, I use something similar to the first setof() line. I do this for long lists (thousands of cells, and also disembodied property lists) as well. What kind of performance risk are you talking about? It might just take a fraction of a second longer, or is it about memory usage?
I have implemented your second solution at one location and, of course, it works as advertised.
Thanks in advance.