Coordinate system problem while exporting DWG from Revit

we are exporting DWG from our revit central model
when we export view with sheets by shared , and export the same view without the sheet by the same setting (by shared)
the dwg model on sheet has the wrong coordinate location but the dwg with the view only has the right coordinates

So this is a common problem , I found a solution that using API but in a later version Export Sheets in Shared Coordinates
Also Macro that Exports All Sheets to DWG also Export Sheets in shared coordinates 2
but i just wondering if it may be a solution in dynamo using the API "if some one gone do it may be he can do it also for Revit 2016 "
so any help guys !

1 Like

im interested in this too.

@Ahmed_Salah1 @jstillplowman I’m developing this exact node for my next release of bimorphNodes package due Q1 2017. It will include inputs to name each file; very useful for BIM projects with naming conventions in place. As far as I’m aware there are no other Dynamo packages out that can export sheets using shared coordinates, but the community will certainly pipe up if there is!

2 Likes

Hi @Ahmed_Salah1

you have pretty much all the info you need in the maccro in your link. I just translated it to python and added the possibility to chose whether you export with shared coordinates, set the prefix and pick the export directory path :

import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import*
clr.AddReference('RevitServices')
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
from System.Collections.Generic import*

doc = DocumentManager.Instance.CurrentDBDocument

collection = FilteredElementCollector(doc).OfClass(ViewSheet).ToElements()
count = []
sheetsToDWG = List[ElementId]()
dwgOptions = DWGExportOptions()
dwgOptions.MergedViews = True;
dwgOptions.SharedCoords = IN[1]
path = IN[0]

TransactionManager.Instance.EnsureInTransaction(doc)
for sheet in collection:
	if sheet.IsPlaceholder == False:
		sheetsToDWG.Add(sheet.Id)
		count.append(sheet)
		
doc.Export(path, IN[2], sheetsToDWG, dwgOptions)

TransactionManager.Instance.TransactionTaskDone()

OUT = '%d sheets exported as DWG' %(len(count))

3 Likes

@Mostafa_El_Ayoubi great man ,you are my hero :smiley:
"i test it on a local file and it worked , i hope it will work when i come back to work next sunday :smile: "

but , there are many ideas can be added to develop this node if you want to
maybe we can plug a sheet list we want to export only
also a node for export setting or use specific pre-saved set for exporting
also export naming if we could have the sheet number only and add a prefix to it

and i have to tell you , i am really thankful for your help

1 Like

@Mostafa_El_Ayoubi
It didnt export with shared coordinates when i try to xref my view it didnt work, the view is far away from sheet model
i tried the script with true and false but it doesn`t work !!!

Hi @Ahmed_Salah1 ,
the code in my previous post is just a translation of the “Macro that exports all sheets to DWG” .
I had a look at your other links and I have a better understanding of the issue now.
What you want is to export a sheet to dwg and have the drawings at their real coordinates in the model view. But revit doesnt allow that.
It seems to be possible with a combination of revit macro (or dynamo script) and autocad lisp.

The first part that consists in exporting each sheet and it’s views (in shared coordinates) to a file is not a problem. It can be done easilly.

There is a second part where a lisp is used to reposition the views in the model view while keeping them properly placed in layout view. I might be wrong, but I don’t think this can be done from Revit/dynamo .

1 Like

@Mostafa_El_Ayoubi
Ok , anyway thanks man for trying , you still my hero :smiley:
Thank You

I’m facing the same problem, did anyone find a solution for it.
Thanks

  • one on the want list - we have the same issue with a specific client and i would really like to solve using Dynamo if its possible - if not i will resort to the Macros.

Hi Thomas, did the node ever get released?! BTW bimorphNodes are looks amazing! Good stuff.