Reply

SelectSetChangedEvent with Synchronous Part

[ Edited ]

 

Hi

I'm trying to get the selected feature of a synchronous part (see attached image).

I wrote this code (C#):

SolidEdgeFramework.ISEDocumentEvents_Event docEvents = (SolidEdgeFramework.ISEDocumentEvents_Event) document.DocumentEvents;

docEvents.SelectSetChanged += new SolidEdgeFramework.ISEDocumentEvents_SelectSetChangedEventHandle(SelectSetChanged);

 

private void SelectSetChanged(object SelectSet)

{

  SolidEdgeFramework.SelectSet s = (SolidEdgeFramework.SelectSet)SelectSet;

  int count = s.Count;

  if (count != 1) return;

  object obj = s.Item(1);

}

The problem is that when the user selects a feature in SolidEdge, the SelectSet.Count is always 0.

The same code works fine for traditional parts.

Any help will be appreciated.

Thanx

Adar

 

Posted by: Adar Shtainhart
Post date: 2/1/2009 2:13:26 AM

6 REPLIES

RE: SelectSetChangedEvent with Synchronous Part

[ Edited ]

Adar,

 

I have confirmed what you're seeing and I believe you have found a geniune bug. To be honest, I'm not surprised at all. The Synchronous API is very much in its infancy stage. Your best bet is to log an IR with GTAC to make sure they know about the problem.

 

Posted by: Jason Newell
Post date: 2/4/2009 5:15:33 PM

RE: SelectSetChangedEvent with Synchronous Part

[ Edited ]

 

Adar,

I just realized that you do have a workaround.  During the SelectSetChanged event, go and get the Application->ActiveSelectSet.  It has the Items correctly populated.

 

Posted by: Jason Newell
Post date: 2/4/2009 5:17:15 PM

RE: SelectSetChangedEvent with Synchronous Part

[ Edited ]

Hi Jason

 

Thank you very much for your answers.

I tried your workaround suggestion but it didn't work either.

 

SolidEdgeFramework.SelectSet s = (SolidEdgeFramework.SelectSet)m_application.ActiveSelectSet;

int count = s.Count;

 

but still the count is zero so I can't use "object obj = s.Item(1);" to get the feature selected.

 

Thanx

Adar

 

Posted by: Adar Shtainhart
Post date: 2/8/2009 2:13:20 AM

RE: SelectSetChangedEvent with Synchronous Part

[ Edited ]

Could be difference in our service packs or just an overall incomplete implentation. i.e. Maybe some selected objects get updated and others don't. (Guessing)

 

You still need to file an IR with GTAC to make sure it gets fixed.

 

Posted by: Jason Newell
Post date: 2/9/2009 11:27:42 AM

RE: SelectSetChangedEvent with Synchronous Part

[ Edited ]

 

Hi Jason

As you suggested, I opened an IR a week ago and I see they changed its status to "Closed as PR" (Problem Report).

My installed version is 100.00.00.133

Is yours different?

 

Thanx

Adar

 

Posted by: Adar Shtainhart
Post date: 2/15/2009 1:11:52 AM

RE: SelectSetChangedEvent with Synchronous Part

[ Edited ]

Supposedly fixed in Solid Edge ST - Maintenance Pack 6

 

===API===

PR 6098711: SelectSetChanged events not being fired properly from select tool in Synchronous

 

Posted by: Jason Newell
Post date: 4/24/2009 8:06:20 AM