T O P I C R E V I E W |
ovince |
Posted - 10/27/2006 : 01:56:05 AM hi,
I have a small routine that should destroy every page except pages which name starts with "ave".
void deleteall() { foreach( PageBase pgb in Project.Pages ) { string name; name = pgb.GetName(); name = name.Left(3); printf("str2 is: %s\n", name); if (!(name == "ave")) { pgb.Destroy(); } } }
But this deletes even hidden things. How to protect hidden things from deleting?
thanks
Oliver |
1 L A T E S T R E P L I E S (Newest First) |
Deanna |
Posted - 10/27/2006 : 03:11:09 AM Hi, you just need to change if (!(name == "ave")) to: if (!(name == "ave") && (pgb.GetShow()!=PAGE_HIDDEN))
Deanna OriginLab Technical Services |
|
|