Why EventAddIn sample does not work?

Why EventAddIn sample does not work?

Anonymous
Not applicable
263 Views
3 Replies
Message 1 of 4

Why EventAddIn sample does not work?

Anonymous
Not applicable
Hi,All,

I compile the VC++ AddIns sample "EventAddIn", and run it under
Inventor11,but I found that the select event does not work.
Whether I select a sketch line,the OK button in "Sketch Pattern" dialog is
alwayse gray.

I add a messagebox in selectEvent , try again, the messagebox does not show.

STDMETHODIMP CSelectEventHandler::onEvent_OnSelect(ObjectsEnumerator *
JustSelectedEntities,
SelectionDeviceEnum SelectionDevice, Point * ModelPosition,
Point2d * ViewPosition, View * View )
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());

AfxMessageBox("Have Select!");

return m_pParent->OnSelect (JustSelectedEntities, SelectionDevice,
ModelPosition, ViewPosition, View );
}

Who can help me?

Thanks.
0 Likes
264 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
I couldn't reproduce the problem. Did you modify the code? I'd suggest you
step through the command code and check if the code in the
PatternSketchCmd::BeginCommand method is working correctly, especially the
calls to subscribe to the select events. Check if any Result values are not
returning S_OK. I couldn't think of anything obvious that might be wrong.

-Venkatesh Thiyagarajan.


"sdh" wrote in message
news:5205436@discussion.autodesk.com...
Hi,All,

I compile the VC++ AddIns sample "EventAddIn", and run it under
Inventor11,but I found that the select event does not work.
Whether I select a sketch line,the OK button in "Sketch Pattern" dialog is
alwayse gray.

I add a messagebox in selectEvent , try again, the messagebox does not show.

STDMETHODIMP CSelectEventHandler::onEvent_OnSelect(ObjectsEnumerator *
JustSelectedEntities,
SelectionDeviceEnum SelectionDevice, Point * ModelPosition,
Point2d * ViewPosition, View * View )
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());

AfxMessageBox("Have Select!");

return m_pParent->OnSelect (JustSelectedEntities, SelectionDevice,
ModelPosition, ViewPosition, View );
}

Who can help me?

Thanks.
0 Likes
Message 3 of 4

Anonymous
Not applicable
Thank you for your advice,.

I found that the PatternSketchCmd::BeginCommand method is OK,
CSelectEventHandler::onEvent_OnPreSelectMouseMove() and
CSelectEventHandler::onEvent_OnStopPreSelect() can work, but
CSelectEventHandler::onEvent_OnPreSelect() and
CSelectEventHandler::onEvent_OnSelect() does not work.

I didn't modify the sample code, only add a messagebox in event for test,
and every time add only in one event.

By the way, my compiler is vc++6.0.

sdh

"Venkatesh Thiyagarajan (Autodesk)" д
ÈëÓʼþ news:5206761@discussion.autodesk.com...
I couldn't reproduce the problem. Did you modify the code? I'd suggest you
step through the command code and check if the code in the
PatternSketchCmd::BeginCommand method is working correctly, especially the
calls to subscribe to the select events. Check if any Result values are not
returning S_OK. I couldn't think of anything obvious that might be wrong.

-Venkatesh Thiyagarajan.


"sdh" wrote in message
news:5205436@discussion.autodesk.com...
Hi,All,

I compile the VC++ AddIns sample "EventAddIn", and run it under
Inventor11,but I found that the select event does not work.
Whether I select a sketch line,the OK button in "Sketch Pattern" dialog is
alwayse gray.

I add a messagebox in selectEvent , try again, the messagebox does not show.

STDMETHODIMP CSelectEventHandler::onEvent_OnSelect(ObjectsEnumerator *
JustSelectedEntities,
SelectionDeviceEnum SelectionDevice, Point * ModelPosition,
Point2d * ViewPosition, View * View )
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());

AfxMessageBox("Have Select!");

return m_pParent->OnSelect (JustSelectedEntities, SelectionDevice,
ModelPosition, ViewPosition, View );
}

Who can help me?

Thanks.
0 Likes
Message 4 of 4

yosef
Community Visitor
Community Visitor
I have the same problem.
The event OnSelect isn't working in sample "EventAddIn" and in sample "CostomCommand" and in my own project.
But OnPreSelectMouseMove and OnStopPreSelect are working.
I'm using VC++6 and in my computer installed Visual Studio 2005.
I'm working in Inventor 11 and 10.
can someone help me?
0 Likes