- UID
- 726601
- 积分
- 43
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2014-2-17
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
例如要i把 int sp3 (struct resbuf *rb) 定义成autolisp函数。
//----- ObjectARX EntryPoint
class CwcadApp : public AcRxArxApp {
public:
CwcadApp() : AcRxArxApp() {}
virtual AcRx::AppRetCode On_kInitAppMsg(void *pkt) {
// TODO: Load dependencies here
// You *must* call On_kInitAppMsg here
AcRx::AppRetCode retCode = AcRxArxApp::On_kInitAppMsg(pkt);
// TODO: Add your initialization code here
return (retCode);
}
virtual AcRx::AppRetCode On_kUnloadAppMsg(void *pkt) {
// TODO: Add your code here
// You *must* call On_kUnloadAppMsg here
AcRx::AppRetCode retCode = AcRxArxApp::On_kUnloadAppMsg(pkt);
// TODO: Unload dependencies here
return (retCode);
}
virtual void RegisterServerComponents() {
}
// Modal Command with localized name
// ACED_ARXCOMMAND_ENTRY_AUTO(CwcadApp, gsMyGroup, MyCommand, MyCommandLocal, ACRX_CMD_MODAL)
static void gsMyGroupMyCommand() {
// Put your command code here
}
// Modal Command with pickfirst selection
// ACED_ARXCOMMAND_ENTRY_AUTO(CwcadApp, gsMyGroup, MyPickFirst, MyPickFirstLocal, ACRX_CMD_MODAL | ACRX_CMD_USEPICKSET)
static void gsMyGroupMyPickFirst() {
ads_name result;
int iRet = acedSSGet(ACRX_T("_I"), NULL, NULL, NULL, result);
if (iRet == RTNORM)
{
// There are selected entities
// Put your command using pickfirst set code here
}
else
{
// There are no selected entities
// Put your command code here
}
}
// Application Session Command with localized name
// ACED_ARXCOMMAND_ENTRY_AUTO(CwcadApp, gsMyGroup, MySessionCmd, MySessionCmdLocal, ACRX_CMD_MODAL | ACRX_CMD_SESSION)
static void gsMyGroupMySessionCmd() {
// Put your command code here
}
// ACED_ADSFUNCTION_ENTRY_AUTO(CwcadApp, MyLispFunction, false)
static int ads_MyLispFunction() {
//struct resbuf *args =acedGetArgs () ;
// Put your command code here
//acutRelRb (args) ;
// Return a value to the AutoCAD Lisp Interpreter
// acedRetNil, acedRetT, acedRetVoid, acedRetInt, acedRetReal, acedRetStr, acedRetPoint, acedRetName, acedRetList, acedRetVal
return (RTNORM);
}
static void gsMyGroupProjPathCfg(void) {//项目及程序路径
CProjectPath dlg;
dlg.DoModal();
};
};
//-----------------------------------------------------------------------------
IMPLEMENT_ARX_ENTRYPOINT(CwcadApp)
ACED_ARXCOMMAND_ENTRY_AUTO(CwcadApp, gsMyGroup, MyCommand, MyCommandLocal, ACRX_CMD_MODAL, NULL)
ACED_ARXCOMMAND_ENTRY_AUTO(CwcadApp, gsMyGroup, MyPickFirst, MyPickFirstLocal, ACRX_CMD_MODAL | ACRX_CMD_USEPICKSET, NULL)
ACED_ARXCOMMAND_ENTRY_AUTO(CwcadApp, gsMyGroup, MySessionCmd, MySessionCmdLocal, ACRX_CMD_MODAL | ACRX_CMD_SESSION, NULL)
ACED_ADSSYMBOL_ENTRY_AUTO(CwcadApp, MyLispFunction, false)
ACED_ARXCOMMAND_ENTRY_AUTO(CwcadApp, gsMyGroup, ProjPathCfg, PrjPath, ACRX_CMD_MODAL, NULL) //项目及及程序路径
|
|