Insert Revit Link to a specified Coordinates

Insert Revit Link to a specified Coordinates

Ta7a
Enthusiast Enthusiast
362 Views
3 Replies
Message 1 of 4

Insert Revit Link to a specified Coordinates

Ta7a
Enthusiast
Enthusiast

Hello,

I hope you're doing well. I have a quick question about using the Revit API.

Is it possible to insert multiple Revit link files into a host file and position each one at specific coordinates? These coordinates could either be provided by the user or retrieved from an Excel file.

If this is feasible, what's the recommended way to get these insertion points? Should I use the ProjectLocation class or perhaps doc.PublishCoordinates()?

I appreciate any insights you can provide.

 

Best, AbdElftah Tarek

 

@jeremytammik  

363 Views
3 Replies
Replies (3)
Message 2 of 4

jeremy_tammik
Alumni
Alumni

In a previous discussion of the same question@bhprest answers:

  

Have you worked through the My First Revit Plug-in tutorial, or read through the documentation about macros ?

  

I would start there if you haven't. After that, you'll need to look through the API documentation to find which functions need to be called. Here is the documentation on the RevitLinkType class, and the RevitLinkInstance class, which I think would be good starting points for what you're looking to achieve.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 3 of 4

jeremy_tammik
Alumni
Alumni

Actually, before pointing to the previous discussion, I can answer your direct questions:

  

> Is it possible to insert multiple Revit link files into a host file and position each one at specific coordinates? 

  

Yes.

  

> what's the recommended way to get these insertion points?  

    

Do you mean get or set? How to get them from Excel or some other external source is completely up to you.

    

You can set the link instance location by using the Move method as described in the Revit API developers guide on Revit Links:

   

https://help.autodesk.com/view/RVT/2024/ENU/?guid=Revit_API_Revit_API_Developers_Guide_Advanced_Topi...

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 4 of 4

Ta7a
Enthusiast
Enthusiast

Thank U

 

0 Likes