Save DWG export settings IN a dynamo file?

Hi everyone,

We have a company wide DWG export setting for when we export sheets as DWG, which i now want to use in a batch plot pdf+dwg script.

The problem is, i am not sure if every project has this export setting saved inside revit.

Is it possible to recreate or save a specific export setting inside a dyn file?
Seems like there are way too much variables to create an export setup with the genius loci node?

image

The exportsettings you see in the “all elements of type” is the one i need, but i want to recreate it without using that node.

This way i am sure that the export will be done correctly, even when the revit file does not have this export setting saved.

Hi,

Which difficulties did you encounter ?
Here is an example to copy DWG export settings from one document to another :

FYI it is possible with the UI :

2 Likes

Hi Alban, thanks for your reply!

I am aware of the transfer project standard function, but I would like to be able to not use this function at all.

The goal is to save a certain export setting inside a dyn file, so I can just create a temporary export setting and use that to export my sheets.

I would like to get the export setting as shown above and maybe keep all the options in a code block ?

If I am able to get all options from this particular setting, I could then create an export setting without the need to have it saved in revit

I hope this clears it up a bit…

To addon to @Alban_de_Chasteigner you can check to see if the desired export settings are loaded and if not load them.

This example is not for export settings but you should be able to reproduce a similar workflow for your needs here.

Edit:
I guess this does not really help. But Can I ask why do you not want to load your export settings into Revit?

1 Like

Thanks for your reply!

Because these files are on network locations, which makes dynamo very slow.

The script is all ready slow as it is and I feel like transferring project standards from a server location won’t do the script much good…

Edit: this is, of course just a guess… I have not tried it but I could imagine loading a Revit project from a network drive will be very slow

If you were to check if the export setting were in the project first you would then only need to load them on the first go. The rest of the time it would see the setting and skip this step.

I would also recommend Storing the settings in a striped out file. Delete all views purge multiple times (make sure to not purge the export setting). The file should be 1-2 mb at this point. If your servers are slow to open the project you could copy the file to the local computer prior to importing and then delete it after.

1 Like

Yeah I believe you are right, I will try this out with a stripped file that contains nothing but export settings.

The try function seems to be very helpful in this case!

I am not at my computer at the moment so will report back later.

Just out of curiosity: does dynamo need to open the project in order to get the export settings from the template file?

I am not sure off the top of my head but I think it does yet. It should open it in the background though and close it when done. This is much faster as it does not need to load it into the UI.

Hi Alban,
One follow up question…

How should I handle Revit versions?

This script is used in revit 2018 and 2019, but I think dynamo needs to check what Revit version the active document is, and then open either the 2018 template file or the 2019 template file.

Or can I just use a 2018 template file, and dynamo will upgrade it to 2019 when it is opened in 2019?

The Rhythm node OpenDocument is similar to the Revit OOTB function. It temporarily upgrades the Revit files to the current version. So no need to worry about the version of Revit.

1 Like

Hi Alban,
Couple of questions if you dont mind :slight_smile:

I recreated your example, it works but for some reason it doesnt show the project in Revit.

I can see the model being upgraded but i cant close it anywhere, does the node close the project after extracting information?
It does create the desired DWG export setting:)

Is it possible to enter the element type as string? I dont want to use drop down nodes…


This doesnt seem to be working unfortunately.

Hi,

Here it is :


Create export DWG settings.dyn (17.9 KB)

If you don’t want to modify the DWG Export Settings, it will be mlore efficient to copy the DWG Export Settings.


Copy export DWG settings.dyn (11.5 KB)

1 Like

Thanks a lot!!

It’s quite easy to implement and better than opening a template file in the background.
Wait for the next release of the Genius Loci package.

1 Like

Can’t wait! Thanks!

1 Like