Export to DWF - To use in Navis and DesingReview

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
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

Thanks in advance!

Filename -> Should be string, not list

1 Like

We solved that problem, thanks!

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

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 (384 KB)
ExportViews-DWF.dyn (11.5 KB)

Thanks!!

  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.
1 Like
  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.

  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!

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.

1 Like
  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).


    Sorry for so many questions, but I’m new with Dynamo,
    Thanks in advance!

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.

1 Like

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.

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.

1 Like

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

Thanks!!

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

2 Likes

Thank you to your help we did it!

THANKS!