Is it possible to perform filtering based on the object identifiers. Consider the case of list of object identifiers, i;ve filter the objects only for those identifiers
|
Re: Filter based on Object Identifiers
I made a handy script for that once, where you will get an edit window and you can paste the identifiers you are looking for and it will filter the ids for you. It is not robust when it tries to ignore the module prefix (so don't use prefixes that end with a number) :-) Have phun with it,
//
/*
*/
DB gui
DBE ed
gui = centered "Filter IDs"
ed = text (gui, "Filter IDs", "", 400, false)
block gui
string s = get(ed)
Regexp re = regexp ("[0-9]+")
string n
int id
if ! re s then print "Nichts gefunden!"
Object o
for o in entire current Module do reject o
while (re s) {
n = s[start 0:end 0]
s = s[end 0+1:]
id = intOf realOf n
// print "Nummer:" n "\n" "Rest:" s "\n"
o = object id
if (!null o) {
accept o
// print "Accepting Object " id "\n"
} else {
print "Object " id " konnte nicht gefunden werden!\n"
}
}
filtering on
|
Re: Filter based on Object Identifiers Mathias Mamsch - Mon Feb 08 05:34:34 EST 2010
I made a handy script for that once, where you will get an edit window and you can paste the identifiers you are looking for and it will filter the ids for you. It is not robust when it tries to ignore the module prefix (so don't use prefixes that end with a number) :-) Have phun with it,
//
/*
*/
DB gui
DBE ed
gui = centered "Filter IDs"
ed = text (gui, "Filter IDs", "", 400, false)
block gui
string s = get(ed)
Regexp re = regexp ("[0-9]+")
string n
int id
if ! re s then print "Nichts gefunden!"
Object o
for o in entire current Module do reject o
while (re s) {
n = s[start 0:end 0]
s = s[end 0+1:]
id = intOf realOf n
// print "Nummer:" n "\n" "Rest:" s "\n"
o = object id
if (!null o) {
accept o
// print "Accepting Object " id "\n"
} else {
print "Object " id " konnte nicht gefunden werden!\n"
}
}
filtering on
it does not throw any error. unable to track what is the result of the regular expression output. I'm not sure what will be the output of the regular expression. :-( |
Re: Filter based on Object Identifiers Lion29 - Mon Feb 08 07:10:54 EST 2010 |
Re: Filter based on Object Identifiers jsarkic - Mon Feb 08 07:25:00 EST 2010 my objective is to filter based on identifiers/abs no... :-) |