Rahul,
I don't know if Dominik's response got what you needed, but I thought
you were asking a different question, so just for clarity's sake, I
thought I would throw out a thought about suppress using layer. In
standard Pro/E, you can suppress by layer by using the status tab in the
find window.
In JLink, you can loop through to get the layers, then interrogate the
layers. Some (crude) example code:
try{
//Grab current session and model
Session curSession = pfcGlobal.GetProESession();
Model curModel = curSession.GetCurrentModel();
ModelItems allItems =
curModel.ListItems(ModelItemType.ITEM_LAYER);
FeatureOperations solidOps =
FeatureOperations.create();
for (int i = 0;i<allitems.getarraysize();i++){<br/>
Layer curLayer = (Layer)allItems.get(i);
if(curLayer.GetName().equalsIgnoreCase("LayerNameToCheck")){
ModelItems allLayerItems =
curLayer.ListItems();
for(int ii =
0;ii<alllayeritems.getarraysize();ii++){<br/>
ModelItem curItem =
allLayerItems.get(ii);
if(curItem.GetType()==ModelItemType.ITEM_FEATURE){
Feature curFeatureToSuppress =
(Feature)curItem;
SuppressOperation suppOp =
curFeatureToSuppress.CreateSuppressOp();
solidOps.append(suppOp);
}
}
}
}
Solid curSolid = (Solid)curModel;
curSolid.ExecuteFeatureOps(solidOps, null);
}
NOTE: Since you are using WF5, in order to utilize the
ExecuteFeatureOps method, you have to use the Pro/E config option
regen_failure_handling (set to resolve_mode). Otherwise you'll get a
toolkit error (according to PTC).
At least that is one way of doing it. Hope all is well!
Brian Krieger
Peterbilt Motors