# Export to DWF - To use in Navis and DesingReview

**URL:** <https://forum.dynamobim.com/t/export-to-dwf-to-use-in-navis-and-desingreview/17825>\
**Category:** Revit\
**Tags:** revit, steamnodes, dynamo, package\
**Created:** [January 3, 2018, 10:14am UTC](https://forum.dynamobim.com/t/export-to-dwf-to-use-in-navis-and-desingreview/17825 "2018-01-03T10:14:15Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![and6rea](https://avatars.discourse-cdn.com/v4/letter/a/91b2a8/32.png) [@and6rea](https://forum.dynamobim.com/u/and6rea)\
**Post date:** [January 3, 2018, 10:14am UTC](https://forum.dynamobim.com/t/export-to-dwf-to-use-in-navis-and-desingreview/17825/1 "2018-01-03T10:14:15Z")

</div>

Hi,

I’m trying to export some 3D view to DWF using the _“Tool.ExportDWF”_ node from **SteamNodes** , but it doesn’t work properly.  
 ![Export dwf](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/f/df6c0056434a610e7a751b04589c9bc8d6293e53.png)  
I also tried with some python script i got from other topic, but it just works for DWG, and I don’t know how to modify it to export DWF.  
[https://forum.dynamobim.com/t/export-view-set-to-dwg/5441](https://forum.dynamobim.com/t/export-view-set-to-dwg/5441)

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Robert2017](https://avatars.discourse-cdn.com/v4/letter/r/b2d939/32.png) [@Robert2017](https://forum.dynamobim.com/u/Robert2017)\
**Post date:** [January 3, 2018, 11:27am UTC](https://forum.dynamobim.com/t/export-to-dwf-to-use-in-navis-and-desingreview/17825/2 "2018-01-03T11:27:05Z")

</div>

Filename -\> Should be string, not list

 ![ForumDynamoBIM_20180103_1114_1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/8/682101ddeb0349bad77cf15f0fe12979f3383cf0.png)

---

<div class="post-metadata">

**Author:** ![and6rea](https://avatars.discourse-cdn.com/v4/letter/a/91b2a8/32.png) [@and6rea](https://forum.dynamobim.com/u/and6rea)\
**Post date:** [January 3, 2018, 12:40pm UTC](https://forum.dynamobim.com/t/export-to-dwf-to-use-in-navis-and-desingreview/17825/3 "2018-01-03T12:40:48Z")

</div>

We solved that problem, thanks!

Now we want to improve the workflow as we explain in the picture attached.

 ![export dwf doubt](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/d/ad9902fee7c8e9d3033c1f6ed0dcd975877b88cc.png)

We have some points to solve:

1. We want to search for views from different disciplines, the first problem is _“Strings.Contains”_ node allows just a single input.

2. Once we have that solved, will be really helpful to export each view at his own discipline folder. This is because we use to work with several projects with the same folder structure. All the exported files have to be saved at his own **relative path** (inside the main project folder).  

3. So we need some way to connect the _“String”_ with the _“Directory Path”_, maybe through an excel file that we previuosly create. So dynamo translate column A as _“String”_ and column B where the dwf has to be exported as _“Directory Path”_.

**Edit:** Please find attached the _.dyn_ an the _.rvt_ example files:  
[Project1.rvt](https://forum.dynamobim.com/uploads/short-url/6Zb7JvENTDQOESggkHD3577A0hA.rvt) (384 KB)  
[ExportViews-DWF.dyn](https://forum.dynamobim.com/uploads/short-url/yFvNrjnJWDmHKuCtMosz6T9of5B.dyn) (11.5 KB)

Thanks!!

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [January 3, 2018, 2:52pm UTC](https://forum.dynamobim.com/t/export-to-dwf-to-use-in-navis-and-desingreview/17825/4 "2018-01-03T14:52:12Z")

</div>

1. String.Contains allows multiple inputs. Look into lacing and levels.
2. Instead of fighting for a relative path, set the path once to the building 2 folder and make a sub folder for each discipline by appending “\disciplinecode” onto every path as required.
3. This can be done by appending the “\disciplinecode” onto the path.

---

<div class="post-metadata">

**Author:** ![and6rea](https://avatars.discourse-cdn.com/v4/letter/a/91b2a8/32.png) [@and6rea](https://forum.dynamobim.com/u/and6rea)\
**Post date:** [January 3, 2018, 4:16pm UTC](https://forum.dynamobim.com/t/export-to-dwf-to-use-in-navis-and-desingreview/17825/5 "2018-01-03T16:16:15Z")

</div>

1. I tried changing lacing between _Shortest_, _Longest_, and _Cross Product_, and I’m not capable to join multiple _Strings_ at **searchFor** input in _“Strings.Contains”_, I also tried with _“CodeBlock”_.

We solve it using the _“Strings.Contains”_ node from Grimshaw package.

 ![Captura string contains (list)](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/c/9c8a7e510ed2808409cc5ddc484fb10d6bc7481c.JPG)

1. I don’t understand what do you meant with the solution for number 2 and 3.

If I set the path for building 2 folder, and create the sub folders for each discipline, then I got the next URL for the folders:  
_C:\Users\Desktop\TEST EXPORT\BUILDING 2_  
_C:\Users\Desktop\TEST EXPORT\BUILDING 2\FPT_

Where I suppose to append **\disciplinecode** at the end of the building 2 path? Or I should use several nodes, one for each discipline path? In that case, I have the same issue as before, _Tool.ExporDWF_ doesn’t allow multiple path at **Path as String** input.

Also, we don’t know how to relate each path with his own discipline. I guess we are missing a middle step. If I set the discipline (“FPT”,“HVAC”,etc) at _“String.Contains”_ and create the folders at the Windows URL, dynamo should be able to relate this views and automaticaly save it on his folder if I just give the building 2 path.

We are on the good way! Thanks!

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [January 4, 2018, 12:13am UTC](https://forum.dynamobim.com/t/export-to-dwf-to-use-in-navis-and-desingreview/17825/6 "2018-01-04T00:13:10Z")

</div>

The string.contains node you’re using is the wrong one. Not sure where it came from but the out of the box version should do here.

 ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/6/c685606b89e1edd541851efa0733696533aa9848.png)

---

<div class="post-metadata">

**Author:** ![and6rea](https://avatars.discourse-cdn.com/v4/letter/a/91b2a8/32.png) [@and6rea](https://forum.dynamobim.com/u/and6rea)\
**Post date:** [January 4, 2018, 10:40am UTC](https://forum.dynamobim.com/t/export-to-dwf-to-use-in-navis-and-desingreview/17825/7 "2018-01-04T10:40:38Z")

</div>

1. Ok, we solved the export issue!

2. Now we need to build a directory path appending **\disciplinecode** to the main path (in this example, “Building 1” main folder where there are all the disciplines sub folder already created). We don’t know how to approach this issue, would be necessary a specific node, or maybe by code block programming? In any case, how should be related the new node that we are missing with _directory path_, it would be necessary any middle step to relate both nodes?

3. Once we solve the point 2, how we should relate each _code block_ value `{"FPT","HVAC"}` with his own path sub folder (inside the new path created in point 2).

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [January 4, 2018, 11:26am UTC](https://forum.dynamobim.com/t/export-to-dwf-to-use-in-navis-and-desingreview/17825/8 "2018-01-04T11:26:49Z")

</div>

To solve issue 2, take your list of disciplines, and append them to the end of the directory path with a pair of + nodes or a code block as follows:

`parentfolder + "\\" + disciplines;`

Parent folder is the directory path you already have. Disciplines is the list of disciplines.

Issue 3 can be solved by applying the correct levels and lacing to the tool.exportasdwf node.

---

<div class="post-metadata">

**Author:** ![and6rea](https://avatars.discourse-cdn.com/v4/letter/a/91b2a8/32.png) [@and6rea](https://forum.dynamobim.com/u/and6rea)\
**Post date:** [January 4, 2018, 2:43pm UTC](https://forum.dynamobim.com/t/export-to-dwf-to-use-in-navis-and-desingreview/17825/9 "2018-01-04T14:43:01Z")

</div>

OK, We export the views as expected! Thanks!!

What about save it in one more level of windows folder? for example, if the project have to be split in buildings and floor levels.

I fill the code block with `parentfolder + "\\" + disciplines + "\\" + floor;` and it works, but not it doesn’t make a cross or cartesian product. Example:

> …\HVAC\P00  
> …\HVAC\P01  
> …\FPT\P00  
> …\FPT\P01

Does exist some other way to create a parent folder, with other node different to Directory Path? We are trying to get relative paths.

If we could create this paths, we would need to relate every file, for example, FPT-P00 with his own path (…\FPT\P00), and we don’t know how to tell dynamo the relation between name files and paths.

 ![Export-CrossProduct](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/9/b939b50936bb179eff7aed0d320127e1590b2c88.PNG)

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [January 4, 2018, 5:20pm UTC](https://forum.dynamobim.com/t/export-to-dwf-to-use-in-navis-and-desingreview/17825/10 "2018-01-04T17:20:06Z")

</div>

use a list.ofrepeateditems node to duplicate the floors for every discipline code.  
in design script it’d be something like:  
`List.OfRepeatedItem( ListOfFloors, List.Count( Disciplines ) );`  
That was completely from memory so I may have messed up the code. You also may need to flatten it as well but I don’t have time to test.

---

<div class="post-metadata">

**Author:** ![and6rea](https://avatars.discourse-cdn.com/v4/letter/a/91b2a8/32.png) [@and6rea](https://forum.dynamobim.com/u/and6rea)\
**Post date:** [January 5, 2018, 10:42am UTC](https://forum.dynamobim.com/t/export-to-dwf-to-use-in-navis-and-desingreview/17825/11 "2018-01-05T10:42:17Z")

</div>

We solved it!

Your code works perfectly, even if it was from memory!

We improved the workflow, now dynamo is capable to read the view names from an excel that contains a default view list, so the people from the team don’t have to filter the views with _Code Block_ manually. We made it with _Excel.ReadFromFile_ node!

But, we have a major problem: testing with a real project, we realice that we need a DWFx, to transfer all the element properties. So _Tool.ExportDWF_ it’s not the node needed, and there isn’t any other DFWx node.

When I export DWFx from Revit I pick the extension at the same time as the path. Any help?  
 ![Duda dwfx exportación](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/c/8c5aa89aa938ee44d5e970ecf9fd9c1e4999e8a8.jpg)

Thanks!!

---

<div class="post-metadata">

**Author:** ![Julien\_Benoit1](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/julien_benoit1/32/29558_2.png) [@Julien\_Benoit1](https://forum.dynamobim.com/u/Julien_Benoit1)\
**Post date:** [January 5, 2018, 2:44pm UTC](https://forum.dynamobim.com/t/export-to-dwf-to-use-in-navis-and-desingreview/17825/12 "2018-01-05T14:44:26Z")

</div>

Have a look at the package manager. I updated my package so you have now the option to switch between DWFx or DWF. default is DWFx.

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/e/4ef84752dd063577fb04a302bf9ff7c7c14a80ea.png)

---

<div class="post-metadata">

**Author:** ![and6rea](https://avatars.discourse-cdn.com/v4/letter/a/91b2a8/32.png) [@and6rea](https://forum.dynamobim.com/u/and6rea)\
**Post date:** [January 9, 2018, 10:08am UTC](https://forum.dynamobim.com/t/export-to-dwf-to-use-in-navis-and-desingreview/17825/13 "2018-01-09T10:08:43Z")

</div>

Thank you to your help we did it!

THANKS!
