This is a demo ASP .NET web application using .NET 4.8 Framework to process AutoCAD drawings using [RealDWG SDK](RealDWG Platform Technologies | Autodesk Developer Network) in the code behind.
The Solution has three projects, lets understand each -
-
ReadDWG
-
This is the main drawing processing library that uses RealDWG SDK.
-
This is has one interface,
IProcessingDrawing
, that takes drawing path and fetchs list of Blocks and Layers names.
-
-
Dummy
- This is a CLI app to test the
ReadDWG
library.
- This is a CLI app to test the
-
WebApp
- This is a web app with one endpoint
api/values
that fetchs list of Blocks and Layers names on web HTML
- This is a web app with one endpoint
- Operating System: Microsoft® Windows® 11 or Windows 10 version 1809 or above. See Autodesk’s Product Support Lifecycle for support information
- RealDWG Platform Technologies | Autodesk Developer Network
-
Get the
Autodesk RealDWG SDK
from [Techsoft3d](Autodesk RealDWG | Tech Soft 3D) vendor, they are the only RealDWG resellers of Autodesk. -
Set REALDWGSDK= <Path of RealDWG SDK>
- example
SET REALDWGSDK=D:\RD23\RealDWG 2023\
- example
-
Download [.NET Framework 4.8 Developer Pack](Download .NET Framework 4.8 | Free official downloads)
-
Download Visual Studio 2019 or 2022 any version, community edition also works.
-
Get a test drawing
git clone https://github.com/MadhukarMoogala/ReadDWG.git
cd ReadDWG
msbuild /t:build /p:Configuration=Debug;Platform=x64
-
Add
AcDbMgd.dll
reference from .\RealDWG 2023\ to ReadDWG project.-
Build ReadDWG project.
-
Note, the path of ReadDWG.dll.
-
-
Add
ReadDWG.dll
reference toDummy
Project.-
Add
AcDbMgd.dll
reference toDummy
Project. -
Set the
Copy Local
to False in theAcDbMgd.dll
reference properties. -
Build Dummy Project.
-
-
Add
ReadDWG.dll
reference toWebApp
Project.- Add
AcDbMgd.dll
reference toWebApp
Project. - Set the
Copy Local
to False in theAcDbMgd.dll
reference properties. - Build WepApp Project.
- Add
Building Dummy Project is optional, as this is test cli project to check if the our library is working.
curl https://localhost:44390/api/values
["0","DB - Windows","Defpoints","Dimensions","Text","Viewports","Walls","Stairs","Deck","Cabinetry","Schedules","Appliances","Doors","Power","Lighting","BDRTXT","BRDTITLE","*Model_Space","*Paper_Space","Toilet","Faucet - top","Faucet - front","Sink","Refrigerator","Range_Oven","Bathtub","Door - Bifold","Receptacle","Lighting fixture","Switch","ARCHBDR-D","Drawing Block Title","*B13","*B14","Window","Door - French","*B17","*B18","*B19","*B20","*B21","*B22","*B23","*B24","*T25","*T26","*B27","Door","*B29","*B30","*B31","*B32","*B33","*B34","*B35","*B36","*B37","*U38","*U39","*U40","*U41","*U42","*U43","*U44","*U45","*U46","*U47","*U48","*U49","*U50","*U51","*U52","*U53"]
This sample is licensed under the terms of the MIT License. Please see the [LICENSE](ReadDWG/LICENSE at master · MadhukarMoogala/ReadDWG · GitHub) file for full details.
Madhukar Moogala, Forge Partner Development @galakar