資源簡介
CAD二次開發ObjectArx之自定義實體:其中又通過多次Jig拖動來完成自定義實體的生成
代碼片段和文件信息
//?(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.?Government?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?“DwgDatabaseUtil.h“
#include?“CustomEntity.h“
#include?“DrawEntityJig.h“
//-----------------------------------------------------------------------------
#define?szRDS?_RXST(“HY“)
//-----------------------------------------------------------------------------
//-----?objectARX?EntryPoint
class?CArxPro3App?:?public?AcRxArxApp?{
public:
CArxPro3App?()?:?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
CCustomEntity::rxInit();
acrxBuildClassHierarchy();
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?()?{
}
//?-?HYArxPro3.CustomEntity?command?(do?not?rename)
static?void?HYArxPro3CustomEntity(void)
{
//?Add?your?code?for?command?HYArxPro3.CustomEntity?here
//?預先設定實體,Jig拖動過程中再進行改變
CCustomEntity*?customEntity?=?new?CCustomEntity(AcGePoint3d::kOrigin?200?CDwgDatabaseUtil::PI()?/?2);
CDrawEntityJig?Jig;
AcDbobjectId?entityId;
if?(Jig.doIt(customEntity)?==?kNormal)
{
double?radiusTemp?=?customEntity->radius();?//?Jig后實體的半徑
double?angleTemp?=?customEntity->angle(); //??Jig后實體的方向角度
entityId?=?CDwgDatabaseUtil::PostToModelSpace(customEntity);
CDwgDatabaseUtil::Setlayer(entityId?_T(“新圖層“));
CDwgDatabaseUtil::AddXdata(entityId?radiusTemp?AcGeVector3d(1?0?0).rotateBy(a
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-03-29?17:11??ArxPro3\
?????目錄???????????0??2017-03-31?15:08??ArxPro3\ArxPro3\
?????文件????34819072??2017-03-31?15:17??ArxPro3\ArxPro3.ncb
?????文件????????1241??2017-03-24?10:28??ArxPro3\ArxPro3.sln
?????文件???????49664??2017-03-31?15:17??ArxPro3\ArxPro3.suo
?????文件?????????116??2017-03-29?11:18??ArxPro3\ArxPro3\acad.err
?????文件????????3427??2017-03-31?14:06??ArxPro3\ArxPro3\acrxEntryPoint.cpp
?????文件????????2444??2017-03-24?10:28??ArxPro3\ArxPro3\ArxPro3.cpp
?????文件????????2150??2017-03-24?10:28??ArxPro3\ArxPro3\ArxPro3.rc
?????文件????????9969??2017-03-30?15:21??ArxPro3\ArxPro3\ArxPro3.vcproj
?????文件????????2771??2017-03-31?15:17??ArxPro3\ArxPro3\ArxPro3.vcproj.ZGC-20151109RCS.Administrator.user
?????文件???????10178??2017-03-31?14:58??ArxPro3\ArxPro3\CustomEntity.cpp
?????文件????????5826??2017-03-31?14:58??ArxPro3\ArxPro3\CustomEntity.h
?????文件????????1895??2017-03-24?10:28??ArxPro3\ArxPro3\DocData.cpp
?????文件????????1692??2017-03-24?10:28??ArxPro3\ArxPro3\DocData.h
?????文件????????2246??2017-03-31?15:08??ArxPro3\ArxPro3\DrawEntityJig.cpp
?????文件????????1803??2017-03-31?14:58??ArxPro3\ArxPro3\DrawEntityJig.h
?????文件????????2632??2017-03-30?15:34??ArxPro3\ArxPro3\DwgDataba
?????文件????????1636??2017-03-29?15:29??ArxPro3\ArxPro3\DwgDataba
?????文件?????????430??2017-03-24?10:28??ArxPro3\ArxPro3\Resource.h
?????文件????????1371??2017-03-24?10:28??ArxPro3\ArxPro3\StdAfx.cpp
?????文件????????4551??2017-03-24?10:28??ArxPro3\ArxPro3\StdAfx.h
?????目錄???????????0??2017-03-24?13:30??ArxPro3\ArxPro3\Win32\
?????目錄???????????0??2017-03-31?15:16??ArxPro3\ArxPro3\Win32\Debug\
?????文件???????91784??2017-03-24?13:47??ArxPro3\ArxPro3\Win32\Debug\acrxEntryPoint.obj
?????文件???????17335??2017-03-24?13:47??ArxPro3\ArxPro3\Win32\Debug\ArxPro3.obj
?????文件?????????868??2017-03-24?13:47??ArxPro3\ArxPro3\Win32\Debug\ArxPro3.res
?????文件???????15374??2017-03-24?13:47??ArxPro3\ArxPro3\Win32\Debug\BuildLog.htm
?????文件??????152052??2017-03-24?13:47??ArxPro3\ArxPro3\Win32\Debug\DocData.obj
?????文件???????14224??2017-03-24?13:47??ArxPro3\ArxPro3\Win32\Debug\DwgDataba
?????文件?????????910??2017-03-24?13:47??ArxPro3\ArxPro3\Win32\Debug\HYArxPro3.arx.em
............此處省略32個文件信息
評論
共有 條評論