iCAx开思工具箱
标题:
CAA Agent
[打印本页]
作者:
liuruixiao205
时间:
2005-4-28 09:06
标题:
CAA Agent
我对Agent的工作顺序不太清楚,特别是有两个state的时候,哪位高手能有或写点这方面的文章。我做了一个选两个点的命令,可一选第二个点就出错。请帮着看看错误在哪里。
_daPathElement = new CATPathElementAgent("GetPoint");
_daPathElement->AddElementType("CATPoint");
_daPathElement->SetBehavior(CATDlgEngWithPSOHSO|
CATDlgEngWithPrevaluation);
//AddCSOClient(_daPathElement);//使得可以先选择被操作对象
CATDialogState *stState1 = GetInitialState("stPointId1");
CATDialogState *stState2 = AddDialogState("stPointId2");
stState1->AddDialogAgent(_daPathElement);
_daPathElement->InitializeAcquisition();
stState2->AddDialogAgent(_daPathElement);
CATDialogTransition *Transition1 =AddTransition
(
stState1,
stState2,
IsOutputSetCondition(_daPathElement),
Action((ActionMethod) & LinCmd::Action1)
) ;
CATDialogTransition *Transition2 =AddTransition
(
stState2,
stState2,
IsOutputSetCondition(_daPathElement),
Action((ActionMethod) & LinCmd::Action2)
) ;
作者:
liuruixiao205
时间:
2005-4-28 09:09
CATBoolean LinCmd::Action1( void *data )
{
CATPathElement * pPathModel = _daPathElement->GetValue();
CATBaseUnknown* unknown1;
unknown1=_daPathElement->GetElementValue( );
//CATIAlias
pPoint1=(CATISpecObject*)unknown1;
_daPathElement->InitializeAcquisition();
return TRUE;
}
CATBoolean LinCmd::Action2( void *data )
{
CATPathElement * pPathModel = _daPathElement->GetValue();
CATBaseUnknown* unknown2;
unknown2=_daPathElement->GetElementValue( );
pPoint2=(CATISpecObject*)unknown2;
_daPathElement->InitializeAcquisition();
return TRUE;
}
作者:
nctusdk
时间:
2005-4-29 09:38
可以描述一下出錯是怎麼個錯法嗎?
SDK.
作者:
liuruixiao205
时间:
2005-4-30 15:42
我编译没错,但在选第二个点时会弹出命令中断对话框。
欢迎光临 iCAx开思工具箱 (https://t.icax.org/)
Powered by Discuz! X3.3