Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Linking revit model and location of link instances

1 REPLY 1
Reply
Message 1 of 2
abbaCADabba
1244 Views, 1 Reply

Linking revit model and location of link instances

I want to take an existing revit model and link it into my current model.

In particular I need to be able to then place it or move it to the appropriate 3d location in the model. (e.g. onto different levels).

Somehow I don't see examples of this in the SDK.

 

Along with this, I am also hoping to take an existing model (along with detail) group in my model and write it out to a separate revit project file, and then perhaps, link this file back in, in the appropriate place.  This would be similar to selecting the group instance in REVIT and clicking on the "LINK" ribbon button.

 

A related question:

In revit, when I open a project and then select a revit link within that project, the properties dialog box does not show very much about it.  In particular, it does not seem to be 'inserted' onto any particular level.  Does revit connect the link instance with any level?  Is this something I can see and modify with the api (e.g. reference in a linked project and then move/copy it onto various levels in the host project.

 

Thanks for any help I can get on this.

 

Abba Lustgarten

ABBACADABBA INC.

1 REPLY 1
Message 2 of 2
jeremytammik
in reply to: abbaCADabba

Dear Abba,

 

Thank you for your query.

 

You can definitely create a link to an existing RVT file and place it in your model.

 

I am not sure about writing it out, though.

 

Here is a list of some API enhancements for handling links added in Revit 2014, from

 

http://thebuildingcoder.typepad.com/blog/2014/07/createlinkreference-sample-code.html

 

  • Identifying links
  • Obtaining linked documents
  • Link creation
  • Link load and unload
  • Link path type
  • Conversion of geometric references
  • Room tag creation from linked rooms
  • Picking in links

 

Looking at What's New in the Revit 2014 API and searching for 'link' takes me to:

 

http://thebuildingcoder.typepad.com/blog/2013/04/whats-new-in-the-revit-2014-api.html

 

Link load and unload

 

The methods

 

  • RevitLinkType.Load()
  • RevitLinkType.LoadFrom()
  • RevitLinkType.Unload()

 

allow a link to be loaded or unloaded, or to be loaded from a new location.

 

Moving from the to the API help, I see the RevitLinkType Create method:

 

http://www.revitapidocs.com/2017/0dd0e8bd-5217-9a94-19bb-58dcb840e517.htm

 

I hope this helps.

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community