기본 콘텐츠로 건너뛰기

3월, 2012의 게시물 표시

ObjectArx2000과 ObjectArx2005 ~ 2006에서 바뀐 점

아시다 시피 ObjectArx2000으로는 AutoCAD2000과 AutoCAD2002밖에 지원하지 못합니다. AutoCAD2004 ~ AutoCAD2006을 지원하기 위해서는 ObjectArx2005 ~ ObjectArx2006을 .NET2002를 사용하여 컴파일해야만 합니다. .NET2003이 아니고 .NET2002입니다.( arx가 안 좋은게 버전마다 틀리게 컴파일을 해줘야 한다는 겁니다.) 자 바뀐점을 살펴보면 우선 눈에 띄는게 entry point 부분의 변경입니다. AcRxArxApp클래스를 상속받은 클래스의 가상함수로 메세지를 처리하고 있습니다. 아래는 AcRx::kInitAppMsg 메세지와 대응됩니다. 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) ; } 아래는 AcRx::kUnloadAppMsg메세지와 대응됩니다. 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) ; } AutoCAD 명령을 등록하는 방법도 UI를 통하여 쉽게 등록할수 있게 하였습니다. 등록한 명령에 대응하는 함수는 static 멤