Giter VIP home page Giter VIP logo

manicotti's Introduction

Manicotti 🌯

Revit API .NET

Revit add-in to build up model automatically based on DWG drawings. This is a toy project in progress and any test or joint development are welcome.

manicotti
β”œ /Demo
β”‚ β”œ *.dwg             - DWG file for testing
β”‚ β”œ *.jpg             - Screenshot
β”‚ β”” *.dll             - Plugin DLL (Revit 2022)
β”” /Manicotti
  β”œ /Properties       - Assembly info
  β”œ /Resources
  β”‚ β”œ /ico            - Button icon files
  β”‚ β”œ /lib            - Teigha DLL files
  β”‚ β”” /rfa            - Revit family files
  β”œ /Util
  β”‚ β”” *.cs            - Utility methods
  β”œ /Views
  β”œ β”œ *.xaml          - WPF View document
  β”‚ β”” *.cs
  β”œ Manicotti.csproj  - Configuration XML
  β”œ Manicotti.sln     - VS solution file
  β”œ App.cs            - Entry point
  β”œ *.cs              - Class library
  β”” Manicotti.addin   - Application manifest

Test the Revit Add-in

Test the demo by Revit 2022 (en-US) with all default family libraries installed. The default folder for Revit Add-in is C:\ProgramData\Autodesk\Revit\Addins\2022\ , or C:\Users\$username$\AppData\Roaming\Autodesk\Revit\Addins\2022\.
The build events of the Visual Studio project will copy all necessary files to that directory after you build the source code. In case that you don't have VS, you need to copy those plugin files manually under that directory. Like this:

ProgramData\Autodesk\Revit\Addins\2022\
β”œ /Manicotti
β”‚ β”œ TD_*.dll        - Copy from /Resources/lib
β”‚ β”” Manicotti.dll   - Copy from /Demo
β”” Manicotti.addin   - Copy from /Manicotti

Then start Revit and (video ref):

  • Insert -> Link CAD -> ...\Demo\Link_floor.dwg
  • Manicotti -> Settings (check if all .rfa files are loaded)
  • Manicotti -> Build up model on all Levels
  • Select the linked DWG in the floorplan view (process takes almost 1min)

Compile the source code

The Manicotti add-in has been tested against Revit 2022. To apply it to other versions you need to rebuild it with correct .NET Framework.
Revit 2022/2021 - .NET 4.8
Revit 2020/2019 - .NET 4.7
Revit 2018 - .NET 4.6

REFERENCE | The project hosts two external references, RevitAPI.dll and RevitAPIUI.dll. You can locate them under ...\Autodesk\Revit 2022\

BUILD EVENTS | Set additional macros in post-build event to copy the built files to the Revit add-in folder.

if exist "$(AppData)\Autodesk\REVIT\Addins\2022" copy "$(ProjectDir)*.addin" "$(AppData)\Autodesk\REVIT\Addins\2022"
if exist "$(AppData)\Autodesk\REVIT\Addins\2022" mkdir "$(AppData)\Autodesk\REVIT\Addins\2022\Manicotti"
copy "$(ProjectDir)$(OutputPath)*.dll" "$(AppData)\Autodesk\REVIT\Addins\2022\Manicotti"
copy "$(ProjectDir)Resources\rfa\*.rfa" "$(AppData)\Autodesk\REVIT\Addins\2022\Manicotti"

DEBUG | Within the project property, under DEBUG panel set external program as ...\Autodesk\Revit 2022\Revit.exe

What's new

This project uses Teigha for temporary development.

To-do list moved to TaskBoard

A demo is online to build up the building model from CAD drawings. Only core components are covered (wall column window door room floor roof). For now the project still needs more cunning & robust algorithms to sort out layers/components and reshape the geometry, which will be the main theme in the next-phase coding.

manicotti's People

Contributors

ian-quinn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

manicotti's Issues

Manicotti.dll

Hallo.
Can you please save somewhere file : Manicotti.dll
Bacause i just dont want install visual studio only for this file
Thx

dll loading exception

Hello, I want to thank you for this amazing project.
I have an issue with this line as it can't load the dll file TD_Mgd_3.03_9.

List<Util.TeighaText.CADTextModel> texts = Util.TeighaText.GetCADText(path);

whenever I try to use the code to create openings an exception is thrown.

here is the Exception details

image

Instruction to first start at pure revit file

Can you please make some instruction for start plugin at pure file?
Bacause i run it, already find some errors, want to push it in your project
For example this
image
if (cadLinkType.IsExternalFileReference())
{
return ModelPathUtils.ConvertModelPathToUserVisiblePath(cadLinkType.GetExternalFileReference().GetAbsolutePath());
}
else
{
String msg = String.Format("Please reload file {0} as link", cadLinkType.Name);
TaskDialog td = new TaskDialog(msg);
td.Show();
return "File is not a link but imported";
};

We can try to work on this project together
I see here is huge work and you have intresting expierence we both can growing if start to work together.

Here is my contact
We can try to talk
t.me/DmitryDronov

Taskboard

Info & drawing boundary

  • Basic demo for the extrusion of walls and columns (from multiple floorplans linked in DWG).
  • Get information from linked/imported DWG other than the exploded one. Geometry instances are read via RevitAPI while semantic texts are channeled by Teigha. (limited to DWG version 2010 or below)
  • Detailed check on the type of geometry objects. If not shattered lines, explode them. (Line, PolyLine, Arc, Solid, GeometryInstance)
  • Align elements in the floorplan based on plan axes other than the relative position to drawing borders.
  • Cluster DWG information of each level by detecting the drawing border and title block (inside DWG layer "FRAME").
  • Fuzzy detection when there's no border or FRAME layer. Identify the type of drawing. Note that the drawing border may be nested blocks.
  • Robust level identification in case of names like "-2F", "δΊŒεε±‚", "25-1F & 25-3F". (Text with largest font size / at certain area)
  • Based on opensource DXF extraction engine netDxf other than Teigha, util the RevitAPI exposing imported CAD text model.
  • Extract text info from block reference / proxy object / text / mtext ...
  • How to solve external reference?
  • Skim out 3D info of CAD
  • Level mark identification to avoid a default setting of floor height
  • Extract info from component details drawings.

Space boundary

  • Detect regions based on intersected stray lines. The split of intersected lines may fail at T-type junction, which has been improved by adding a tiny extension neglectable (by 1%) to the lines.
  • Name spaces by the enclosed text note (Layer "ROOM").
  • Create floors according to wall encasement or Boolean-union regions.
  • Generate wall axes in case of variable thickness. (and wall family type)
  • Join axes that span windows, doors, columns, and variant-thickness wall junctions.
  • Merge overlapping axes while retaining wall types.
  • Align wall axes mesh grid to floorplan axis. Need axes identification.
  • Curtain wall as space boundary
  • Add virtual room boundary when encountered with semi-open space or minor gaps
  • Solve extension gaps
  • Fire zone identification and projection

Instances

  • Insert windows on wall surfaces.
  • Create rectangular column types with any size and deflection.
  • Create a new column family based on closed PolyLine.
  • Create rooms with Name from CAD
  • Recognize door block and door types by their different characteristics
  • Reuse unique shaped column types
  • Create round columns
  • Semantic information injection
  • AI in space function label assignment

Usability

  • Load family mannually
  • Multi-language support (Family or family template name)
  • Error handling
  • Processing bar
  • Pause model checking of Revit

Code improvement

  • Upgrade UI Ribbon with some stacked buttons.
  • Upgrade buttons with customized icons.
  • Add a WPF dataform for user settings.
  • Upgrade the project structure. (Separate Util, Algo, App, Cmd, Execution)
  • Load sources inside the project. May solve the 'System.IO.FileNotFoundException'...
  • UV and XYZ coordinates.
  • Better use of Curve & Line types
  • Nomenclature (FRAME, WALL, COLUMN, SPACE, AXIS...)
  • Avoid multiple open & close of DXF, too many iterations
  • Dump memory immediately

Mission impossible

  • Elevation drawing identification and data fusion
  • CAD to gxXML / IDF for energy modeling

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.