From 33613a85afc4b1481367fbe92a17ee59c240250b Mon Sep 17 00:00:00 2001 From: Sven Eisenhauer Date: Fri, 10 Nov 2023 15:11:48 +0100 Subject: add new repo --- Master/CGuCAD/projects/Prakt1/Prakt1.sln | 26 ++ Master/CGuCAD/projects/Prakt1/Prakt1.suo | Bin 0 -> 12800 bytes Master/CGuCAD/projects/Prakt1/Prakt1/DocData.cpp | 43 ++ Master/CGuCAD/projects/Prakt1/Prakt1/DocData.h | 40 ++ Master/CGuCAD/projects/Prakt1/Prakt1/Prakt1.cpp | 59 +++ Master/CGuCAD/projects/Prakt1/Prakt1/Prakt1.rc | 101 +++++ Master/CGuCAD/projects/Prakt1/Prakt1/Prakt1.vcproj | 474 +++++++++++++++++++++ .../Prakt1/Prakt1.vcproj.SYNERVA.eisenhauer.user | 65 +++ Master/CGuCAD/projects/Prakt1/Prakt1/Resource.h | 16 + Master/CGuCAD/projects/Prakt1/Prakt1/StdAfx.cpp | 27 ++ Master/CGuCAD/projects/Prakt1/Prakt1/StdAfx.h | 104 +++++ .../projects/Prakt1/Prakt1/acrxEntryPoint.cpp | 461 ++++++++++++++++++++ 12 files changed, 1416 insertions(+) create mode 100644 Master/CGuCAD/projects/Prakt1/Prakt1.sln create mode 100644 Master/CGuCAD/projects/Prakt1/Prakt1.suo create mode 100644 Master/CGuCAD/projects/Prakt1/Prakt1/DocData.cpp create mode 100644 Master/CGuCAD/projects/Prakt1/Prakt1/DocData.h create mode 100644 Master/CGuCAD/projects/Prakt1/Prakt1/Prakt1.cpp create mode 100644 Master/CGuCAD/projects/Prakt1/Prakt1/Prakt1.rc create mode 100644 Master/CGuCAD/projects/Prakt1/Prakt1/Prakt1.vcproj create mode 100644 Master/CGuCAD/projects/Prakt1/Prakt1/Prakt1.vcproj.SYNERVA.eisenhauer.user create mode 100644 Master/CGuCAD/projects/Prakt1/Prakt1/Resource.h create mode 100644 Master/CGuCAD/projects/Prakt1/Prakt1/StdAfx.cpp create mode 100644 Master/CGuCAD/projects/Prakt1/Prakt1/StdAfx.h create mode 100644 Master/CGuCAD/projects/Prakt1/Prakt1/acrxEntryPoint.cpp (limited to 'Master/CGuCAD/projects/Prakt1') diff --git a/Master/CGuCAD/projects/Prakt1/Prakt1.sln b/Master/CGuCAD/projects/Prakt1/Prakt1.sln new file mode 100644 index 0000000..21ea80d --- /dev/null +++ b/Master/CGuCAD/projects/Prakt1/Prakt1.sln @@ -0,0 +1,26 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Prakt1", "Prakt1\Prakt1.vcproj", "{A4DB8027-DDBE-42BF-9459-F1B4560BEB62}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A4DB8027-DDBE-42BF-9459-F1B4560BEB62}.Debug|Win32.ActiveCfg = Debug|Win32 + {A4DB8027-DDBE-42BF-9459-F1B4560BEB62}.Debug|Win32.Build.0 = Debug|Win32 + {A4DB8027-DDBE-42BF-9459-F1B4560BEB62}.Debug|x64.ActiveCfg = Debug|x64 + {A4DB8027-DDBE-42BF-9459-F1B4560BEB62}.Debug|x64.Build.0 = Debug|x64 + {A4DB8027-DDBE-42BF-9459-F1B4560BEB62}.Release|Win32.ActiveCfg = Release|Win32 + {A4DB8027-DDBE-42BF-9459-F1B4560BEB62}.Release|Win32.Build.0 = Release|Win32 + {A4DB8027-DDBE-42BF-9459-F1B4560BEB62}.Release|x64.ActiveCfg = Release|x64 + {A4DB8027-DDBE-42BF-9459-F1B4560BEB62}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Master/CGuCAD/projects/Prakt1/Prakt1.suo b/Master/CGuCAD/projects/Prakt1/Prakt1.suo new file mode 100644 index 0000000..b9a9db1 Binary files /dev/null and b/Master/CGuCAD/projects/Prakt1/Prakt1.suo differ diff --git a/Master/CGuCAD/projects/Prakt1/Prakt1/DocData.cpp b/Master/CGuCAD/projects/Prakt1/Prakt1/DocData.cpp new file mode 100644 index 0000000..aaeeaf7 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt1/Prakt1/DocData.cpp @@ -0,0 +1,43 @@ +// (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. +// + +//----------------------------------------------------------------------------- +//----- DocData.cpp : Implementation file +//----------------------------------------------------------------------------- +#include "StdAfx.h" + +//----------------------------------------------------------------------------- +//----- The one and only document manager object. You can use the DocVars object to retrieve +//----- document specific data throughout your application +AcApDataManager DocVars ; + +//----------------------------------------------------------------------------- +//----- Implementation of the document data class. +CDocData::CDocData () { +} + +//----------------------------------------------------------------------------- +CDocData::CDocData (const CDocData &data) { +} + +//----------------------------------------------------------------------------- +CDocData::~CDocData () { +} diff --git a/Master/CGuCAD/projects/Prakt1/Prakt1/DocData.h b/Master/CGuCAD/projects/Prakt1/Prakt1/DocData.h new file mode 100644 index 0000000..456f3f7 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt1/Prakt1/DocData.h @@ -0,0 +1,40 @@ +// (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. +// + +//----------------------------------------------------------------------------- +//----- DocData.h : include file for document specific data. An instance of this +//----- class is automatically created and managed by the AsdkDataManager class. +//----- See the AsdkDmgr.h / DocData.cpp for more datails +//----------------------------------------------------------------------------- +#pragma once + +//----------------------------------------------------------------------------- +//----- Here you can store the document / database related data. +class CDocData { + + //----- TODO: here you can add your variables + +public: + CDocData () ; + CDocData (const CDocData &data) ; + ~CDocData () ; + +} ; diff --git a/Master/CGuCAD/projects/Prakt1/Prakt1/Prakt1.cpp b/Master/CGuCAD/projects/Prakt1/Prakt1/Prakt1.cpp new file mode 100644 index 0000000..c7f1dbd --- /dev/null +++ b/Master/CGuCAD/projects/Prakt1/Prakt1/Prakt1.cpp @@ -0,0 +1,59 @@ +// (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. +// + +//----------------------------------------------------------------------------- +//- Prakt1.cpp : Initialization functions +//----------------------------------------------------------------------------- +#include "StdAfx.h" +#include "resource.h" +#include + +//----------------------------------------------------------------------------- +//- Define the sole extension module object. +AC_IMPLEMENT_EXTENSION_MODULE(Prakt1DLL) +//- Please do not remove the 3 following lines. These are here to make .NET MFC Wizards +//- running properly. The object will not compile but is require by .NET to recognize +//- this project as being an MFC project +#ifdef NEVER +AFX_EXTENSION_MODULE Prakt1ExtDLL ={ NULL, NULL } ; +#endif + +//- Now you can use the CAcModuleResourceOverride class in +//- your application to switch to the correct resource instance. +//- Please see the ObjectARX Documentation for more details + +//----------------------------------------------------------------------------- +//- DLL Entry Point +extern "C" +BOOL WINAPI DllMain (HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) { + //- Remove this if you use lpReserved + UNREFERENCED_PARAMETER(lpReserved) ; + + if ( dwReason == DLL_PROCESS_ATTACH ) { + _hdllInstance =hInstance ; + Prakt1DLL.AttachInstance (hInstance) ; + InitAcUiDLL () ; + } else if ( dwReason == DLL_PROCESS_DETACH ) { + Prakt1DLL.DetachInstance () ; + } + return (TRUE) ; +} + diff --git a/Master/CGuCAD/projects/Prakt1/Prakt1/Prakt1.rc b/Master/CGuCAD/projects/Prakt1/Prakt1/Prakt1.rc new file mode 100644 index 0000000..37d7af5 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt1/Prakt1/Prakt1.rc @@ -0,0 +1,101 @@ +//Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE DISCARDABLE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE DISCARDABLE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE DISCARDABLE +BEGIN + "\0" +END + +#endif // APSTUDIO_INVOKED + +#ifndef _MAC +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,1 + PRODUCTVERSION 1,0,0,1 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "Prakt1 ObjectARX application\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "Prakt1\0" + VALUE "LegalCopyright", "Copyright © 2002\0" + VALUE "OriginalFilename", "CGCAD_seiPrakt1.arx\0" + VALUE "ProductName", "Prakt1 Application\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0409, 0x04B0 + END +END + +#endif // !_MAC + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PROJNAME "Prakt1" +END + + + +///////////////////////////////////////////////////////////////////////////// + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/Master/CGuCAD/projects/Prakt1/Prakt1/Prakt1.vcproj b/Master/CGuCAD/projects/Prakt1/Prakt1/Prakt1.vcproj new file mode 100644 index 0000000..f9cdb3b --- /dev/null +++ b/Master/CGuCAD/projects/Prakt1/Prakt1/Prakt1.vcproj @@ -0,0 +1,474 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/CGuCAD/projects/Prakt1/Prakt1/Prakt1.vcproj.SYNERVA.eisenhauer.user b/Master/CGuCAD/projects/Prakt1/Prakt1/Prakt1.vcproj.SYNERVA.eisenhauer.user new file mode 100644 index 0000000..e82dc15 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt1/Prakt1/Prakt1.vcproj.SYNERVA.eisenhauer.user @@ -0,0 +1,65 @@ + + + + + + + + + + + diff --git a/Master/CGuCAD/projects/Prakt1/Prakt1/Resource.h b/Master/CGuCAD/projects/Prakt1/Prakt1/Resource.h new file mode 100644 index 0000000..fc512a4 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt1/Prakt1/Resource.h @@ -0,0 +1,16 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by Prakt1.rc +// +#define IDS_PROJNAME 100 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 102 +#define _APS_NEXT_COMMAND_VALUE 32768 +#define _APS_NEXT_CONTROL_VALUE 100 +#define _APS_NEXT_SYMED_VALUE 102 +#endif +#endif diff --git a/Master/CGuCAD/projects/Prakt1/Prakt1/StdAfx.cpp b/Master/CGuCAD/projects/Prakt1/Prakt1/StdAfx.cpp new file mode 100644 index 0000000..afd4d88 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt1/Prakt1/StdAfx.cpp @@ -0,0 +1,27 @@ +// (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. +// + +//----------------------------------------------------------------------------- +//------ StdAfx.cpp : source file that includes just the standard includes +//------ StdAfx.pch will be the pre-compiled header +//------ StdAfx.obj will contain the pre-compiled type information +//----------------------------------------------------------------------------- +#include "StdAfx.h" diff --git a/Master/CGuCAD/projects/Prakt1/Prakt1/StdAfx.h b/Master/CGuCAD/projects/Prakt1/Prakt1/StdAfx.h new file mode 100644 index 0000000..4b4210b --- /dev/null +++ b/Master/CGuCAD/projects/Prakt1/Prakt1/StdAfx.h @@ -0,0 +1,104 @@ +// (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. +// + +//----------------------------------------------------------------------------- +//- StdAfx.h : include file for standard system include files, +//- or project specific include files that are used frequently, +//- but are changed infrequently +//----------------------------------------------------------------------------- +#pragma once + +#pragma pack (push, 8) +#pragma warning(disable: 4786 4996) +//#pragma warning(disable: 4098) + +//----------------------------------------------------------------------------- +#define STRICT + +#ifndef VC_EXTRALEAN +#define VC_EXTRALEAN //- Exclude rarely-used stuff from Windows headers +#endif + +//- Modify the following defines if you have to target a platform prior to the ones specified below. +//- Refer to MSDN for the latest info on corresponding values for different platforms. +#ifndef WINVER //- Allow use of features specific to Windows 95 and Windows NT 4 or later. +#define WINVER 0x0400 //- Change this to the appropriate value to target Windows 98 and Windows 2000 or later. +#endif + +#ifndef _WIN32_WINNT //- Allow use of features specific to Windows NT 4 or later. +#define _WIN32_WINNT 0x0400 //- Change this to the appropriate value to target Windows 2000 or later. +#endif + +#ifndef _WIN32_WINDOWS //- Allow use of features specific to Windows 98 or later. +#define _WIN32_WINDOWS 0x0410 //- Change this to the appropriate value to target Windows Me or later. +#endif + +#ifndef _WIN32_IE //- Allow use of features specific to IE 4.0 or later. +#define _WIN32_IE 0x0400 //- Change this to the appropriate value to target IE 5.0 or later. +#endif + + +//- ObjectARX and OMF headers needs this +#include + +//----------------------------------------------------------------------------- +#include //- MFC core and standard components +#include //- MFC extensions + +#ifndef _AFX_NO_OLE_SUPPORT +#include //- MFC OLE classes +#include //- MFC OLE dialog classes +#include //- MFC Automation classes +#endif // _AFX_NO_OLE_SUPPORT + +#ifndef _AFX_NO_DB_SUPPORT +#include //- MFC ODBC database classes +#endif // _AFX_NO_DB_SUPPORT + +#ifndef _AFX_NO_DAO_SUPPORT +#include //- MFC DAO database classes +#endif // _AFX_NO_DAO_SUPPORT + +#include //- MFC support for Internet Explorer 4 Common Controls +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include //- MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + +//----------------------------------------------------------------------------- +//- Include ObjectDBX/ObjectARX headers +//- Uncomment one of the following lines to bring a given library in your project. +//#define _BREP_SUPPORT_ //- Support for the BRep API +//#define _HLR_SUPPORT_ //- Support for the Hidden Line Removal API +//#define _AMODELER_SUPPORT_ //- Support for the AModeler API +//#define _ASE_SUPPORT_ //- Support for the ASI/ASE API +//#define _RENDER_SUPPORT_ //- Support for the AutoCAD Render API +//#define _ARX_CUSTOM_DRAG_N_DROP_ //- Support for the ObjectARX Drag'n Drop API +//#define _INC_LEAGACY_HEADERS_ //- Include legacy headers in this project +#include "arxHeaders.h" + +//----------------------------------------------------------------------------- +#include "DocData.h" //- Your document specific data class holder + +//- Declare it as an extern here so that it becomes available in all modules +extern AcApDataManager DocVars ; + +#pragma pack (pop) + diff --git a/Master/CGuCAD/projects/Prakt1/Prakt1/acrxEntryPoint.cpp b/Master/CGuCAD/projects/Prakt1/Prakt1/acrxEntryPoint.cpp new file mode 100644 index 0000000..c46fd0a --- /dev/null +++ b/Master/CGuCAD/projects/Prakt1/Prakt1/acrxEntryPoint.cpp @@ -0,0 +1,461 @@ +// (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 "axlock.h" +//----------------------------------------------------------------------------- +#define szRDS _RXST("CGCAD_sei") + +//Prototypes +void createNewLayer(); +void createFloor(ads_real,ads_real,ads_real); +void createRoof(ads_real ,ads_real, ads_real, ads_real); + +//Constants +#define LAYERNAME _T("HAUS10LAYER") +#define WINDOW_HEIGHT 90 +#define WINDOWS_WIDTH 90 + +//Global variables +ads_point base_point = {0.0, 0.0, 0.0}; + +//----------------------------------------------------------------------------- +//----- ObjectARX EntryPoint +class CPrakt1App : public AcRxArxApp { + +public: + CPrakt1App () : 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 () { + } + +public: + + // - CGCAD_seiPrakt1.house10 command (do not rename) + static void CGCAD_seiPrakt1house10(void) + { + createNewLayer(); + + // Add your code for command CGCAD_seiPrakt1.house10 here + acutPrintf(_T("\nHaus 10 App. by SEi!")); + ads_point dlgPoint = {0.0,0.0,0.0}; + + if (RTNORM != acedGetPoint(dlgPoint,_T("\nEnter BasePoint for House"),base_point)) { + acutPrintf(_T("\nError reading base point for house")); + return; + } + acutPrintf(_T("\nYou entered %d, %d, %d as base point for house") + ,base_point[0],base_point[1],base_point[2] ); + + ads_real house_length; + if (RTNORM != acedGetReal(_T("\nLength: "),&house_length)) { + acutPrintf(_T("\nError reading length")); + return; + } + + ads_real house_width; + if (RTNORM != acedGetReal(_T("\nWidth: "),&house_width)) { + acutPrintf(_T("\nError reading width")); + return; + } + + ads_real house_height; + if (RTNORM != acedGetReal(_T("\nHeight: "),&house_height)) { + acutPrintf(_T("\nError reading heigth")); + return; + } + + ads_real house_roof_height; + if (RTNORM != acedGetReal(_T("\nRoof Height: "),&house_roof_height)) { + acutPrintf(_T("\nError reading roof heigth")); + return; + } + + createFloor(house_length,house_width,house_height); + createRoof(house_length,house_width,house_height,house_roof_height); + + acedCommand(RTSTR, _T("_zoom"), RTSTR, _T("a"),RTSTR,PAUSE,0); + } +} ; + +void +createNewLayer() +{ + //AcAxDocLock docLock; + AcDbLayerTable *pLayerTable = NULL; + AcDbDatabase *pDB = NULL; + pDB = acdbHostApplicationServices()->workingDatabase(); + + Acad::ErrorStatus res = pDB->getSymbolTable(pLayerTable, AcDb::kForWrite); + + if (Acad::eOk != res) { + acutPrintf(_T("\nError opening layer table: %d"),res); + return; + } + + AcDbLayerTableRecord *pLayerTableRecord = + new AcDbLayerTableRecord; + + pLayerTableRecord->setName(LAYERNAME); + AcCmColor layerColor; + layerColor.setRGB(255,255,255); + pLayerTableRecord->setColor(layerColor); + + // Defaults are used for other properties of + // the layer if they are not otherwise specified. + // + if ( Acad::eOk != pLayerTable->add(pLayerTableRecord) ) { + acutPrintf(_T("\nError add Layer")); + return; + } + if ( Acad::eOk != pLayerTable->close() ) { + acutPrintf(_T("\nError close Layer table")); + return; + } + if ( Acad::eOk != pLayerTableRecord->close() ) { + acutPrintf(_T("\nError close Layer table record")); + return; + } +} +void +createFloor(ads_real length,ads_real width, ads_real height) { + // floor + AcGePoint3d floor1_point1(base_point[0], base_point[1], base_point[2]); + AcGePoint3d floor1_point2(base_point[0]+length, base_point[1],base_point[2]); + AcGePoint3d floor1_point3(base_point[0], base_point[1]+width, base_point[2]); + AcDbFace* floor1 = new AcDbFace(floor1_point1,floor1_point2,floor1_point3,false,false,false,false); + floor1->setLayer(LAYERNAME); + AcGePoint3d floor2_point1(base_point[0], base_point[1]+width, base_point[2]); + AcGePoint3d floor2_point2(base_point[0]+length, base_point[1]+width, base_point[2]); + AcGePoint3d floor2_point3(base_point[0]+length, base_point[1], base_point[2]); + AcDbFace* floor2 = new AcDbFace(floor2_point1,floor2_point2,floor2_point3,false,false,false,false); + floor2->setLayer(LAYERNAME); + + //ceiling + AcGePoint3d ceiling1_point1(base_point[0], base_point[1]+width, base_point[2]+height); + AcGePoint3d ceiling1_point2(base_point[0]+length, base_point[1]+width, base_point[2]+height); + AcGePoint3d ceiling1_point3(base_point[0], base_point[1]+width, base_point[2]+height); + AcDbFace* ceiling1 = new AcDbFace(ceiling1_point1,ceiling1_point2,ceiling1_point3,false,false,false,false); + ceiling1->setLayer(LAYERNAME); + AcGePoint3d ceiling2_point1(base_point[0], base_point[1]+width, base_point[2]+height); + AcGePoint3d ceiling2_point2(base_point[0]+length, base_point[1]+width, base_point[2]+height); + AcGePoint3d ceiling2_point3(base_point[0]+length, base_point[1], base_point[2]+height); + AcDbFace* ceiling2 = new AcDbFace(ceiling2_point1,ceiling2_point2,ceiling2_point3,false,false,false,false); + ceiling2->setLayer(LAYERNAME); + + //front wall + AcGePoint3d front1_point1(base_point[0], base_point[1], base_point[2]); + AcGePoint3d front1_point2(base_point[0], base_point[1], base_point[2]+height); + AcGePoint3d front1_point3(base_point[0]+length, base_point[1], base_point[2]); + AcDbFace* front1 = new AcDbFace(front1_point1,front1_point2,front1_point3,false,false,false,false); + front1->setLayer(LAYERNAME); + AcGePoint3d front2_point1(base_point[0], base_point[1], base_point[2]+height); + AcGePoint3d front2_point2(base_point[0]+length, base_point[1], base_point[2]+height); + AcGePoint3d front2_point3(base_point[0]+length, base_point[1], base_point[2]); + AcDbFace* front2 = new AcDbFace(front2_point1,front2_point2,front2_point3,false,false,false,false); + front2->setLayer(LAYERNAME); + + //rear wall + AcGePoint3d rear1_point1(base_point[0], base_point[1]+width, base_point[2]); + AcGePoint3d rear1_point2(base_point[0], base_point[1]+width, base_point[2]+height); + AcGePoint3d rear1_point3(base_point[0]+length, base_point[1]+width, base_point[2]); + AcDbFace* rear1 = new AcDbFace(rear1_point1,rear1_point2,rear1_point3,false,false,false,false); + rear1->setLayer(LAYERNAME); + AcGePoint3d rear2_point1(base_point[0], base_point[1]+width, base_point[2]+height); + AcGePoint3d rear2_point2(base_point[0]+length, base_point[1]+width, base_point[2]+height); + AcGePoint3d rear2_point3(base_point[0]+length, base_point[1]+width, base_point[2]); + AcDbFace* rear2 = new AcDbFace(rear2_point1,rear2_point2,rear2_point3,false,false,false,false); + rear2->setLayer(LAYERNAME); + + ads_real window_lower = base_point[2]+( (height/2)-(WINDOW_HEIGHT/2) ); + ads_real window_upper = base_point[2]+( (height/2)+(WINDOW_HEIGHT/2) ); + ads_real window_near = base_point[1]+( (width/2)-(WINDOWS_WIDTH/2) ); + ads_real window_far = base_point[1]+( (width/2)+(WINDOWS_WIDTH/2) ); + //right wall + AcGePoint3d right1_point1(base_point[0]+length, base_point[1], base_point[2]); + AcGePoint3d right1_point2(base_point[0]+length, base_point[1]+width, base_point[2]); + AcGePoint3d right1_point3(base_point[0]+length, window_far, window_lower); + AcGePoint3d right1_point4(base_point[0]+length, window_near, window_lower); + AcDbFace* right1 = new AcDbFace( + right1_point1,right1_point2,right1_point3,right1_point4 + ,false,false,false,false); + right1->setLayer(LAYERNAME); + AcGePoint3d right2_point1(base_point[0]+length, base_point[1], base_point[2]); + AcGePoint3d right2_point2(base_point[0]+length, base_point[1], base_point[2]+height); + AcGePoint3d right2_point3(base_point[0]+length, window_near, window_upper); + AcGePoint3d right2_point4(base_point[0]+length, window_near, window_lower); + AcDbFace* right2 = new AcDbFace( + right2_point1,right2_point2,right2_point3,right2_point4 + ,false,false,false,false); + right2->setLayer(LAYERNAME); + AcGePoint3d right3_point1(base_point[0]+length, base_point[1], base_point[2]+height); + AcGePoint3d right3_point2(base_point[0]+length, base_point[1]+width, base_point[2]+height); + AcGePoint3d right3_point3(base_point[0]+length, window_far, window_upper); + AcGePoint3d right3_point4(base_point[0]+length, window_near, window_upper); + AcDbFace* right3 = new AcDbFace( + right3_point1,right3_point2,right3_point3,right3_point4 + ,false,false,false,false); + right3->setLayer(LAYERNAME); + AcGePoint3d right4_point1(base_point[0]+length, base_point[1]+width, base_point[2]+height); + AcGePoint3d right4_point2(base_point[0]+length, base_point[1]+width, base_point[2]); + AcGePoint3d right4_point3(base_point[0]+length, window_far, window_lower); + AcGePoint3d right4_point4(base_point[0]+length, window_far, window_upper); + AcDbFace* right4 = new AcDbFace( + right4_point1,right4_point2,right4_point3,right4_point4 + ,false,false,false,false); + right4->setLayer(LAYERNAME); + + //left wall + AcGePoint3d left1_point1(base_point[0], base_point[1], base_point[2]); + AcGePoint3d left1_point2(base_point[0], base_point[1]+width, base_point[2]); + AcGePoint3d left1_point3(base_point[0], window_far, window_lower); + AcGePoint3d left1_point4(base_point[0], window_near, window_lower); + AcDbFace* left1 = new AcDbFace( + left1_point1,left1_point2,left1_point3,left1_point4 + ,false,false,false,false); + left1->setLayer(LAYERNAME); + AcGePoint3d left2_point1(base_point[0], base_point[1], base_point[2]); + AcGePoint3d left2_point2(base_point[0], base_point[1], base_point[2]+height); + AcGePoint3d left2_point3(base_point[0], window_near, window_upper); + AcGePoint3d left2_point4(base_point[0], window_near, window_lower); + AcDbFace* left2 = new AcDbFace( + left2_point1,left2_point2,left2_point3,left2_point4 + ,false,false,false,false); + left2->setLayer(LAYERNAME); + AcGePoint3d left3_point1(base_point[0], base_point[1], base_point[2]+height); + AcGePoint3d left3_point2(base_point[0], base_point[1]+width, base_point[2]+height); + AcGePoint3d left3_point3(base_point[0], window_far, window_upper); + AcGePoint3d left3_point4(base_point[0], window_near, window_upper); + AcDbFace* left3 = new AcDbFace( + left3_point1,left3_point2,left3_point3,left3_point4 + ,false,false,false,false); + left3->setLayer(LAYERNAME); + AcGePoint3d left4_point1(base_point[0], base_point[1]+width, base_point[2]+height); + AcGePoint3d left4_point2(base_point[0], base_point[1]+width, base_point[2]); + AcGePoint3d left4_point3(base_point[0], window_far, window_lower); + AcGePoint3d left4_point4(base_point[0], window_far, window_upper); + AcDbFace* left4 = new AcDbFace( + left4_point1,left4_point2,left4_point3,left4_point4 + ,false,false,false,false); + left4->setLayer(LAYERNAME); + + // Now we need to open the appropriate container which is inside BlockTable + AcDbBlockTable *pBlockTable = NULL; + + // Get the current Database + AcDbDatabase* pDB = acdbHostApplicationServices()->workingDatabase(); + + if (Acad::eOk != pDB->getSymbolTable(pBlockTable, AcDb::kForRead)) { + acutPrintf(_T("\nError getting block table")); + return; + } + // Inside BlockTable, open the ModelSpace + AcDbBlockTableRecord* pBlockTableRecord = NULL; + pBlockTable->getAt(ACDB_MODEL_SPACE, pBlockTableRecord, AcDb::kForWrite); + + // After get ModelSpace we can close the BlockTable + pBlockTable->close(); + + // Using ModelSpace pointer we can add our brand new line + AcDbObjectId floor1Id = AcDbObjectId::kNull; + pBlockTableRecord->appendAcDbEntity(floor1Id, floor1); + AcDbObjectId floor2Id = AcDbObjectId::kNull; + pBlockTableRecord->appendAcDbEntity(floor2Id, floor2); + + AcDbObjectId ceiling1Id = AcDbObjectId::kNull; + pBlockTableRecord->appendAcDbEntity(ceiling1Id, ceiling1); + AcDbObjectId ceiling2Id = AcDbObjectId::kNull; + pBlockTableRecord->appendAcDbEntity(ceiling2Id, ceiling2); + + AcDbObjectId front1Id = AcDbObjectId::kNull; + pBlockTableRecord->appendAcDbEntity(front1Id, front1); + AcDbObjectId front2Id = AcDbObjectId::kNull; + pBlockTableRecord->appendAcDbEntity(front2Id, front2); + + AcDbObjectId rear1Id = AcDbObjectId::kNull; + pBlockTableRecord->appendAcDbEntity(rear1Id, rear1); + AcDbObjectId rear2Id = AcDbObjectId::kNull; + pBlockTableRecord->appendAcDbEntity(rear2Id, rear2); + + AcDbObjectId right1Id = AcDbObjectId::kNull; + pBlockTableRecord->appendAcDbEntity(right1Id, right1); + AcDbObjectId right2Id = AcDbObjectId::kNull; + pBlockTableRecord->appendAcDbEntity(right2Id, right2); + AcDbObjectId right3Id = AcDbObjectId::kNull; + pBlockTableRecord->appendAcDbEntity(right3Id, right3); + AcDbObjectId right4Id = AcDbObjectId::kNull; + pBlockTableRecord->appendAcDbEntity(right4Id, right4); + + AcDbObjectId left1Id = AcDbObjectId::kNull; + pBlockTableRecord->appendAcDbEntity(left1Id, left1); + AcDbObjectId left2Id = AcDbObjectId::kNull; + pBlockTableRecord->appendAcDbEntity(left2Id, left2); + AcDbObjectId left3Id = AcDbObjectId::kNull; + pBlockTableRecord->appendAcDbEntity(left3Id, left3); + AcDbObjectId left4Id = AcDbObjectId::kNull; + pBlockTableRecord->appendAcDbEntity(left4Id, left4); + + // To finish the process we need to close ModelSpace and the entity + pBlockTableRecord->close(); + floor1->close(); + floor2->close(); + ceiling1->close(); + ceiling2->close(); + front1->close(); + front2->close(); + rear1->close(); + rear2->close(); + right1->close(); + right2->close(); + right3->close(); + right4->close(); + left1->close(); + left2->close(); + left3->close(); + left4->close(); +} +void +createRoof(ads_real length,ads_real width, ads_real level,ads_real roofHeight) { + // Now we need to open the appropriate container which is inside BlockTable + AcDbBlockTable *pBlockTable = NULL; + + // Get the current Database + AcDbDatabase* pDB = acdbHostApplicationServices()->workingDatabase(); + + if (Acad::eOk != pDB->getSymbolTable(pBlockTable, AcDb::kForRead)) { + acutPrintf(_T("\nError getting block table")); + return; + } + // Inside BlockTable, open the ModelSpace + AcDbBlockTableRecord* pBlockTableRecord = NULL; + pBlockTable->getAt(ACDB_MODEL_SPACE, pBlockTableRecord, AcDb::kForWrite); + + // After get ModelSpace we can close the BlockTable + pBlockTable->close(); + // front + AcGePoint3d rooffront1_point1(base_point[0], base_point[1], base_point[2]+level); + AcGePoint3d rooffront1_point2(base_point[0]+length/2, base_point[1], base_point[2]+level); + AcGePoint3d rooffront1_point3(base_point[0]+length/2, base_point[1], base_point[2]+level+roofHeight); + AcDbFace* rooffront1 = new AcDbFace(rooffront1_point1,rooffront1_point2,rooffront1_point3,false,false,false,false); + rooffront1->setLayer(LAYERNAME); + AcDbObjectId rooffront1Id = AcDbObjectId::kNull; + pBlockTableRecord->appendAcDbEntity(rooffront1Id, rooffront1); + + AcGePoint3d rooffront2_point1(base_point[0]+length/2, base_point[1], base_point[2]+level); + AcGePoint3d rooffront2_point2(base_point[0]+length, base_point[1], base_point[2]+level); + AcGePoint3d rooffront2_point3(base_point[0]+length/2, base_point[1], base_point[2]+level+roofHeight); + AcDbFace* rooffront2 = new AcDbFace(rooffront2_point1,rooffront2_point2,rooffront2_point3,false,false,false,false); + rooffront2->setLayer(LAYERNAME); + AcDbObjectId rooffront2Id = AcDbObjectId::kNull; + pBlockTableRecord->appendAcDbEntity(rooffront2Id, rooffront2); + // rear + AcGePoint3d roofrear1_point1(base_point[0], base_point[1]+width, base_point[2]+level); + AcGePoint3d roofrear1_point2(base_point[0]+length/2, base_point[1]+width, base_point[2]+level); + AcGePoint3d roofrear1_point3(base_point[0]+length/2, base_point[1]+width, base_point[2]+level+roofHeight); + AcDbFace* roofrear1 = new AcDbFace(roofrear1_point1,roofrear1_point2,roofrear1_point3,false,false,false,false); + roofrear1->setLayer(LAYERNAME); + AcDbObjectId roofrear1Id = AcDbObjectId::kNull; + pBlockTableRecord->appendAcDbEntity(roofrear1Id, roofrear1); + + AcGePoint3d roofrear2_point1(base_point[0]+length/2, base_point[1]+width, base_point[2]+level); + AcGePoint3d roofrear2_point2(base_point[0]+length, base_point[1]+width, base_point[2]+level); + AcGePoint3d roofrear2_point3(base_point[0]+length/2, base_point[1]+width, base_point[2]+level+roofHeight); + AcDbFace* roofrear2 = new AcDbFace(roofrear2_point1,roofrear2_point2,roofrear2_point3,false,false,false,false); + roofrear2->setLayer(LAYERNAME); + AcDbObjectId roofrear2Id = AcDbObjectId::kNull; + pBlockTableRecord->appendAcDbEntity(roofrear2Id, roofrear2); + // left + AcGePoint3d roofleft1_point1(base_point[0], base_point[1], base_point[2]+level); + AcGePoint3d roofleft1_point2(base_point[0], base_point[1]+width, base_point[2]+level); + AcGePoint3d roofleft1_point3(base_point[0]+length/2, base_point[1], base_point[2]+level+roofHeight); + AcDbFace* roofleft1 = new AcDbFace(roofleft1_point1,roofleft1_point2,roofleft1_point3,false,false,false,false); + roofleft1->setColorIndex(10); + roofleft1->setLayer(LAYERNAME); + AcDbObjectId roofleft1Id = AcDbObjectId::kNull; + pBlockTableRecord->appendAcDbEntity(roofleft1Id, roofleft1); + + AcGePoint3d roofleft2_point1(base_point[0], base_point[1]+width, base_point[2]+level); + AcGePoint3d roofleft2_point2(base_point[0]+length/2, base_point[1]+width, base_point[2]+level+roofHeight); + AcGePoint3d roofleft2_point3(base_point[0]+length/2, base_point[1], base_point[2]+level+roofHeight); + AcDbFace* roofleft2 = new AcDbFace(roofleft2_point1,roofleft2_point2,roofleft2_point3,false,false,false,false); + roofleft2->setLayer(LAYERNAME); + roofleft2->setColorIndex(10); + AcDbObjectId roofleft2Id = AcDbObjectId::kNull; + pBlockTableRecord->appendAcDbEntity(roofleft2Id, roofleft2); + // right + AcGePoint3d roofright1_point1(base_point[0]+length, base_point[1], base_point[2]+level); + AcGePoint3d roofright1_point2(base_point[0]+length, base_point[1]+width, base_point[2]+level); + AcGePoint3d roofright1_point3(base_point[0]+length/2, base_point[1], base_point[2]+level+roofHeight); + AcDbFace* roofright1 = new AcDbFace(roofright1_point1,roofright1_point2,roofright1_point3,false,false,false,false); + roofright1->setColorIndex(10); + roofright1->setLayer(LAYERNAME); + AcDbObjectId roofright1Id = AcDbObjectId::kNull; + pBlockTableRecord->appendAcDbEntity(roofright1Id, roofright1); + + AcGePoint3d roofright2_point1(base_point[0]+length, base_point[1]+width, base_point[2]+level); + AcGePoint3d roofright2_point2(base_point[0]+length/2, base_point[1]+width, base_point[2]+level+roofHeight); + AcGePoint3d roofright2_point3(base_point[0]+length/2, base_point[1], base_point[2]+level+roofHeight); + AcDbFace* roofright2 = new AcDbFace(roofright2_point1,roofright2_point2,roofright2_point3,false,false,false,false); + roofright2->setLayer(LAYERNAME); + roofright2->setColorIndex(10); + AcDbObjectId roofright2Id = AcDbObjectId::kNull; + pBlockTableRecord->appendAcDbEntity(roofright2Id, roofright2); + // To finish the process we need to close ModelSpace and the entity + pBlockTableRecord->close(); + roofleft1->close(); + roofleft2->close(); + roofright1->close(); + roofright2->close(); + rooffront1->close(); + rooffront2->close(); + roofrear1->close(); + roofrear2->close(); +} +//----------------------------------------------------------------------------- +IMPLEMENT_ARX_ENTRYPOINT(CPrakt1App) + +ACED_ARXCOMMAND_ENTRY_AUTO(CPrakt1App, CGCAD_seiPrakt1, house10, haus10, ACRX_CMD_MODAL, NULL) -- cgit v1.2.3