- UID
- 764067
- 积分
- 120
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2016-9-29
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2017-3-8 09:34:28
|
显示全部楼层
按照你说的,objectARX2016放在系统目录Support里,就可以加载了。
但我之前的2012前的版本,dll都是放在arx同目录就可以了啊。
下面是我objectarx2010的acrxEntrypoint.cpp的代码:
![](source/plugin/imc_colorcode/images/loading.gif) - // (C) Copyright 2002-2007 by Autodesk, Inc.
- //
- // Permission to use, copy, modify, and distribute this software in
- // object code form for any purpose and without fee is hereby granted,
- // provided that the above copyright notice appears in all copies and
- // that both that copyright notice and the limited warranty and
- // restricted rights notice below appear in all supporting
- // documentation.
- //
- // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
- // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
- // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
- // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
- // UNINTERRUPTED OR ERROR FREE.
- //
- // Use, duplication, or disclosure by the U.S. ** is subject to
- // restrictions set forth in FAR 52.227-19 (Commercial Computer
- // Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
- // (Rights in Technical Data and Computer Software), as applicable.
- //
- //-----------------------------------------------------------------------------
- //----- acrxEntryPoint.cpp
- //-----------------------------------------------------------------------------
- #include "StdAfx.h"
- #include "resource.h"
- #include "DocumentReactor.h"
- #include "EditorReactor.h"
- #include "AboutUs.h"
- //-----------------------------------------------------------------------------
- #define szRDS _RXST("LiYu")
- DocumentReactor* pDocumentReactor = NULL;
- EditorReactor* pEditorReactor = NULL;
- //-----------------------------------------------------------------------------
- //----- ObjectARX EntryPoint
- class CClient_2010App : public AcRxArxApp {
- public:
- CClient_2010App () : 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
- Encryption ecrtyption;
- ecrtyption.AddMenu(false);
- if(pEditorReactor == NULL)
- pEditorReactor = new EditorReactor();
- if(pDocumentReactor == NULL)
- pDocumentReactor = new DocumentReactor();
- return (retCode) ;
- }
- virtual AcRx::AppRetCode On_kUnloadAppMsg (void *pkt) {
- // TODO: Add your code here
- if (pEditorReactor!=NULL)
- {
- delete pEditorReactor;
- pEditorReactor = NULL;
- }
- if (pDocumentReactor != NULL)
- {
- delete pDocumentReactor;
- pDocumentReactor = NULL;
- }
- // You *must* call On_kUnloadAppMsg here
- AcRx::AppRetCode retCode =AcRxArxApp::On_kUnloadAppMsg (pkt) ;
- // TODO: Unload dependencies here
- return (retCode) ;
- }
- virtual void RegisterServerComponents () {
- //----- Self-register COM server upon loading.
- if ( FAILED(::DllRegisterServer ()) )
- acutPrintf (_RXST("Failed to register COM server.\n")) ;
- }
- // - LiYuClient_2010._ShowAboutUs command (do not rename)
- static void LiYuClient_2010_ShowAboutUs(void)
- {
- // Add your code for command LiYuClient_2010._ShowAboutUs here
- CAcModuleResourceOverride resOverride;
- //显示ObjectARX的模态对话框
- AboutUs theDialog;
- theDialog.DoModal();
- }
- // - LiYuClient_2010._Test command (do not rename)
- static void LiYuClient_2010_Test(void)
- {
- // Add your code for command LiYuClient_2010._Test here
- //sdebug
- AcDbDatabase *pCurrentDatabase = acdbHostApplicationServices()->workingDatabase();
- AcGePoint3d extMax = pCurrentDatabase->extmax();
- AcGePoint3d extMin = pCurrentDatabase->extmin();
- //edebug
- }
- } ;
- //-----------------------------------------------------------------------------
- IMPLEMENT_ARX_ENTRYPOINT(CClient_2010App)
- ACED_ARXCOMMAND_ENTRY_AUTO(CClient_2010App, LiYuClient_2010, _ShowAboutUs, ShowAboutUs, ACRX_CMD_TRANSPARENT, NULL)
- ACED_ARXCOMMAND_ENTRY_AUTO(CClient_2010App, LiYuClient_2010, _Test, Test, ACRX_CMD_TRANSPARENT, NULL)
此外,我在objectarx2016里面创建objectARX MFCSupport类,无法填写Dialog ID,如下图:
请问这个是为什么?我把UAC调到最低,重启电脑后用管理员模式安装了objectarx2016,目录也都是用默认的,没有修改,请问这个问题你知道如何解决吗?谢谢你。。。这几天被新版本搞的头大。
|
|