johnpierson / RhythmForDynamo

A collection of nodes for use in Dynamo with Revit.
BSD 3-Clause "New" or "Revised" License
110 stars 25 forks source link

Documents.CopyElementsFromDocument placing elements 1 foot from actual location #15

Closed jkb430 closed 5 years ago

jkb430 commented 5 years ago

First off, your Rhythm Package is great, and I continue to find more and more uses for the nodes you publish. Thank you for sharing them with us!

I am currently using your Documents.CopyElementsFromDocument node to bring in portions of a master facility Revit file based on a boundary I set. However, it seems that the node brings in all copied elements into the Revit document precisely 1 foot to the East (+1' in X direction) from their initial locations. I've tested this on numerous files and validated linked file placement and internal/project base points all match. Unfortunately, trying to translate the elements in Revit after copy is proving to be an issue with hosted elements, etc.

I am currently using the 2018.9.19 published Rhythm package (as I'm not quite ready to transition our office to the Dynamo 2.0 version until we can devote time to updating all our scripts). Please let me know if this is a version issue or if it is something that is still a problem and can be resolved. Thanks!

Images of script and offset copied elements attached.

script snapshot copy offset

johnpierson commented 5 years ago

Hmm, I will have to look at this some more. Do you have a sample file for me to reproduce?

jkb430 commented 5 years ago

See the attached sample dynamo file for your use. The intent of this particular script is to gather all elements within a drawn boundary from a linked model and place them in the current project.

Sample Copy From Linked Model Offset.zip

johnpierson commented 5 years ago

Can you go ahead and try the node Document.CopyElementsFromLinkedDocument and see if that helps?

jkb430 commented 5 years ago

I haven't been able to get that one to work in the past, but just managed to swap out the instance input with a different element and ran great. Seems to copy to the right location with that node. What was the intended purpose of the other node if not for linked documents?

Thanks for your help!

johnpierson commented 5 years ago

The other node was originally developed loading element types from background opened documents. The initial use case was Partition Types I believe. :) Glad the other one worked out for you! What that one does is calculate the local transform of the link instance and apply it to the new elements. (Even if the user didn't "move" the link. There can be a fundamental location difference somewhere)