cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Is suppress by layer exist in ProE?

ptc-3191571
1-Visitor

Is suppress by layer exist in ProE?

I have seen some threads having discussion on this topic earlier WF 2.0.Does this functionality exist in WF 5.0 M 060.? If yes please let me know how can I use it.


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
3 REPLIES 3

Hello Rahul,

If you would like to use the possibility, to set the layer status programatically, then yes this is possible.

Function: ProLayerDisplaystatusSet

Status to HIDDEN

This is also possible in WF3 and 4.

Best Regards

DOMINIK HARTINGER

APPLICATION ENGINEER

CADS GmbH Tel.: +43 (0) 7262-9396-3660
Technologiepark 17, A-4320 Perg Fax: +43 (0) 7262-9396-493660
www.cads.at <u>www.ptc-apps.com</u>

Hello Dominik,

Will this operation make features available on this layer hidden?

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


Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags