Copying and Placing Linked Model According to autocad coordinates

Hi All
i`m trying to working on dynamo script to do the following
1- link revit file from path
2-Copying or placing the geometry of the same linked file in several places according to autocad drawing

my project is a large project contains 500 villas with several types but i`m trying now on just a sample for me …

my first step is : in the autocad drawing i created 2 blocks represnts the types of villlas .

my second step : i created 2 revit models to be the links models that represents the types of villas and make the names of them matches with the autocad block names .
revit links files

my this step i start working on the script :

this script helps me to link the files from path and get the all data from the auto cad drawing

but my main problem now i can`t move farther or doing anything in scirpt to make it copy the geometry of this link file to the another places in the autocad drawing

can any one help me in this case to copy the revit link to another places acoording to the autocad coordintes ???

and now problem to consider the revit link as geometry only but is there a way to copy the link as link to another place in the same model ???

This should get you started: Create Instances of linked Revit model on specified locations - #7 by Karam_Baki

im sorry but i cant understand this
because i`m not good in python and i was thinking on working with nodes

Unfortunately I do not know if a node to accomplish your goal, but if you copy and paste the code from that thread into the contexts of a Python node you should be able to get started.

You can also review the Dynamo Python Primer and other Python resources to learn the basics and get started.

i copied it and this is the results


it rotate the linked model but in different place

i`m sorry i will upload the dynamo script and the cad and the linked file and master plan if u can check it will be very very kind of u …
10.dyn (27.3 KB)
Trying.dwg (39.0 KB)
Type1 link.rvt (5.2 MB)

and i will watch python that u shared thanks very much
Master Plan.rvt (5.1 MB)

If you omit the rotation, do the origin points align?

1 Like

no it works at the same way and give me the same results and i don`t why
!!!

Was your dwg linked to the internal origin?

yes

i think that i reached the problem
it`s in the vector for the translation

but i dont know how to create a vector its start point and it`s end point make the link comes on the cad drawing ?

and i think too if there any method or node to copy elements to points instead of vectors it will work good …

Hi @fares.tolbaTZUDN,

I wrote a Python code that does both the rotation and the translation.
It doesn’t matter whether the linked model is already loaded or not; it should work the same.

Try this dynamo code and let me know if it works.
If it keeps moving the link instances to the wrong locations, the issue may be related to the model units. In that case, it can be worked out.

Link to Cad Locations.dyn (14.3 KB)

1 Like

thanks very much it works great but u have too make the base point of the cad block on the base point of the model that u make it link

1 Like