Hi, |
Re: filtering on OLE
Not with the standard filter, but with DXL. The below script uses oleCount(o."Object Text") to identify whether an "Object Text" contains an OLE object, and then accept and reject to apply the filtering. Caveat: The filter cannot be stored with a View.
// OLE
/*
Find OLE Objects
*/
void filterOLE(DB db, bool showOLEObjects)
{
filtering off
Object o
int nos = 0
int NOleObjects = 0
int NOleElements = 0
int n
string h
for o in current Module do nos++
int nSave = nos
progressStart(db, "Filtering OLE objects", name(current Module),nos)
nos = 0
for o in current Module do
{
progressStep ++nos
h = "Object #: " nos " [" nSave "]"
progressMessage h
if (progressCancelled){if (confirm("Exit loop?")){progressStop; halt}}
n = oleCount(o."Object Text")
if (!null(n))
{(showOLEObjects)?(accept o):(reject o); NOleObjects++; NOleElements = NOleElements + n}
else {(showOLEObjects)?(reject o):(accept o)}
}
filtering on
refresh current
progressStop
infoBox(
db,
NOleObjects " Objects out of " nSave " contain OLE elements.\n"//-
NOleElements " OLE elements in total."
)
hide db
}
void showOLE(DB db){filterOLE(db, true)}
void hideOLE(DB db){filterOLE(db, false)}
DB oleDB = create("", styleCentered)
apply(oleDB, "Show OLE objects", showOLE)
apply(oleDB, "Hide OLE objects", hideOLE)
show oleDB
|
Re: filtering on OLE Peter_Albert - Fri Mar 02 04:10:20 EST 2012
Not with the standard filter, but with DXL. The below script uses oleCount(o."Object Text") to identify whether an "Object Text" contains an OLE object, and then accept and reject to apply the filtering. Caveat: The filter cannot be stored with a View.
// OLE
/*
Find OLE Objects
*/
void filterOLE(DB db, bool showOLEObjects)
{
filtering off
Object o
int nos = 0
int NOleObjects = 0
int NOleElements = 0
int n
string h
for o in current Module do nos++
int nSave = nos
progressStart(db, "Filtering OLE objects", name(current Module),nos)
nos = 0
for o in current Module do
{
progressStep ++nos
h = "Object #: " nos " [" nSave "]"
progressMessage h
if (progressCancelled){if (confirm("Exit loop?")){progressStop; halt}}
n = oleCount(o."Object Text")
if (!null(n))
{(showOLEObjects)?(accept o):(reject o); NOleObjects++; NOleElements = NOleElements + n}
else {(showOLEObjects)?(reject o):(accept o)}
}
filtering on
refresh current
progressStop
infoBox(
db,
NOleObjects " Objects out of " nSave " contain OLE elements.\n"//-
NOleElements " OLE elements in total."
)
hide db
}
void showOLE(DB db){filterOLE(db, true)}
void hideOLE(DB db){filterOLE(db, false)}
DB oleDB = create("", styleCentered)
apply(oleDB, "Show OLE objects", showOLE)
apply(oleDB, "Hide OLE objects", hideOLE)
show oleDB
|
Re: filtering on OLE PDU - Fri Mar 02 04:21:10 EST 2012 Object o for o in m do { if(oleIsObject o) { accept o } else { reject o } } filtering on |
Re: filtering on OLE SystemAdmin - Fri Mar 02 07:29:36 EST 2012
Module m = current
Object o
for o in m do
{
if(oleIsObject o)
{
accept o
}
else
{
reject o
}
}
filtering on
|
Re: filtering on OLE Peter_Albert - Fri Mar 02 04:10:20 EST 2012
Not with the standard filter, but with DXL. The below script uses oleCount(o."Object Text") to identify whether an "Object Text" contains an OLE object, and then accept and reject to apply the filtering. Caveat: The filter cannot be stored with a View.
// OLE
/*
Find OLE Objects
*/
void filterOLE(DB db, bool showOLEObjects)
{
filtering off
Object o
int nos = 0
int NOleObjects = 0
int NOleElements = 0
int n
string h
for o in current Module do nos++
int nSave = nos
progressStart(db, "Filtering OLE objects", name(current Module),nos)
nos = 0
for o in current Module do
{
progressStep ++nos
h = "Object #: " nos " [" nSave "]"
progressMessage h
if (progressCancelled){if (confirm("Exit loop?")){progressStop; halt}}
n = oleCount(o."Object Text")
if (!null(n))
{(showOLEObjects)?(accept o):(reject o); NOleObjects++; NOleElements = NOleElements + n}
else {(showOLEObjects)?(reject o):(accept o)}
}
filtering on
refresh current
progressStop
infoBox(
db,
NOleObjects " Objects out of " nSave " contain OLE elements.\n"//-
NOleElements " OLE elements in total."
)
hide db
}
void showOLE(DB db){filterOLE(db, true)}
void hideOLE(DB db){filterOLE(db, false)}
DB oleDB = create("", styleCentered)
apply(oleDB, "Show OLE objects", showOLE)
apply(oleDB, "Hide OLE objects", hideOLE)
show oleDB
Thank you Peter, your script is working very well. |
Re: filtering on OLE yes, the above accept/reject filtering will work. But if you want to save the filter in a view, you'd need something like this:
..err.. if there is an OLE in the Object Text. If you want to find all objects with ANY OLE in any Text attribute, you'd need to poll all such attributes:
-Louie
|