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

The community will undergo maintenance on October 16th at 10:00 PM PDT and will be unavailable for up to one hour.

How to use Visit Methods in OTK Java?

YaroslavSin
17-Peridot

How to use Visit Methods in OTK Java?

Hello!

 

In Java OTK it is possible to use Visit Methods (Creo 7 JavaUser’s Guide page 52).

I'm don't understand how to implement interface com.ptc.wfc.wfcClient.VisitingClient to past it to one of Visit Methods.

Anybody has experiences with this? Can you provide shot sample of code?

 

My NOT working code

 

class VC implements com.ptc.wfc.wfcClient.VisitingClient
{
    @Override
    public Status ApplyAction (com.ptc.pfc.pfcObject.Object pfcobject, Status filter_status) throws jxthrowable
    {
        int i = 0;
        return Status.TK_NO_ERROR;
    }
    
    @Override
    public Status ApplyFilter (com.ptc.pfc.pfcObject.Object pfcobject) throws jxthrowable
    {
       return Status.TK_NO_ERROR; 
    }
}
class SaveButtontListener extends DefaultUICommandActionListener
  {
    public Session session;
   
    public  SaveButtontListener (Session currentSession)
    {
	session = currentSession;
    }
	
    public void toAssy()
    {
	try 
	{
            Model model = session.GetCurrentModel();
            WModel wmodel = (WModel) model;       
            VisitingClient vc = new VC();      
            Status err = wmodel.VisitItems(vc, ModelItemType.ITEM_FEATURE);
}
.........

 

 

0 REPLIES 0
Announcements


Top Tags