Hello my name is Daniel, am researching Printing and Export process.
My questions are:
1. How does the export to DWFx work?
2. Is the process simply exports all visible elements on plan view (Geometry, Annotation, etc.), or is there a more
complicated process such as printing preprocessing?
The reason I’m asking is, what if I would like to create my own Plan View export, for example to SVG or
Some other XML based format of my own creation. With complete detail information (Annotations, etc).
Do you think that would be possible? Or maybe there is an API similar to IFC exporter that may be available
In the future?
Thank you for your time.
Daniel
Solved! Go to Solution.
Solved by jeremytammik. Go to Solution.
Dear Daniel,
Thank you for your query.
There are a lot of answers to this.
1. How does the export to DWFx work?
The first answer is simple, and applies to most of the Revit API:
The Revit API export to DXFx works exactly the same way as the user interface functionality.
Call the Document.Export method overload taking a DWFXExportOptions argument to exports the current view or a selection of views in DWFX format.
For examples, please look at the Revit SDK and The Building Coder blog, e.g.
http://lmgtfy.com/?q=building+coder+dwf+export
2. Does it simply exports all visible elements on plan view?
It exports exactly what you see in the view. You can set up the view to export what you want. This includes annotation and also sections:
http://thebuildingcoder.typepad.com/blog/2011/08/section-view-geometry.html
3. I would like to create my own Plan View export, for example to SVG or some other XML based format.
You can look at my simplified 2D BIM room editor for a very complete example of exporting 2D to SVG:
http://lmgtfy.com/?q=building+coder+room+editor
For a full 3D export to JSON, you can look at what we achieved last weekend at the AEC Hackathon in New York:
We won second prize!
I hope this helps.
Best regards,
Jeremy
> 3. I would like to create my own Plan View export, for example to SVG or some other XML based format.
> You can look at my simplified 2D BIM room editor for a very complete example of exporting 2D to SVG:
> http://lmgtfy.com/?q=building+coder+room+editor
Where you can see on the code file in SVG?
3a. Clone the source code from GitHub:
https://github.com/jeremytammik/RoomEditorApp
3b. Load the solution file in Visual Studio.
3c. Search globally for "svg".
Cheers,
Jeremy
I do not use Visual Studio.
would like to see the code example as
<svg ...>
<defs ...> ... </defs>
...
</svg>
If you do not use Visual Studio, you can simply download the code and search through the text in the C# source code.
What I do is trivial.
All I do is populate the "d" attribute defining the data of the SVG path tag:
http://www.w3.org/TR/SVG/paths.html#PathData
Here is an example of the code generating an (X, Y) tuple to append to the SVG path "d" attribute for a given 2D point:
/// <summary> /// Return a string suitable for use in an SVG /// path. For index i == 0, prefix with 'M', for /// i == 1 with 'L', and otherwise with nothing. /// </summary> public string SvgPath( int i ) { return string.Format( "{0}{1} {2}", ( 0 == i ? "M" : ( 1 == i ? "L" : "" ) ), X, Util.SvgFlipY( Y ) ); }
Cheers,
Jeremy
I'm interested in the end result in xml (svg) that you can use in other CAD systems.
Good luck to you!
Here is a new absolutely minimal sample showing how to generate an SVG representation of a room boundary and send it to an external Heroku-hosted node.js web server for display:
Cheers,
Jeremy
Hi,
I want to export SVG format Revit Rooms & boundary , how to use your add in revit 2019
Thanks
Prakash Pisipati
Recompile for Revit 2019, install and launch the external command, just like any other command:
https://thebuildingcoder.typepad.com/blog/about-the-author.html#2
Can't find what you're looking for? Ask the community or share your knowledge.