Get all link and position options

Good morning.
I’m trying to develop a Python code that allows me to link multiple files from a directory.
The problem I’m having is that I can’t get these objects displayed in the link management window.

Well, the intention is to be able to assign to my main code via an input what type of position the link to be called will take, so I have in mind that the main code will ask for the directory and the type of position as input.
That’s why I first try to obtain the image object, which has 7 types.
Could someone share some Python code with me that I could use? I would really appreciate it.

Hi,

you can use this enumeration

Thanks for the comment, now my question would be why “ImportPlacement” only has 4 types and the Revit window has 7 types???

The last three are manual procedures that do not correspond to a specific method. Instead, they form a series of methods.

  1. PickPoint (host model)

  2. Create a RevitLinkInstance instance at the origin (to origin)

  3. Move the RevitLinkInstance instance:

  • origin Location of link model towards the PickPoint

or

  • base project Location of link model towards the PickPoint

or

  • center Location of link model towards the PickPoint
2 Likes

Manual is excluded from the automation, for perhaps obvious reasons. They can still be achieved by linking from an automated method and the applying a transform vector though.

2 Likes

Thanks for your comments, I’ll make the code and see how it works. I would greatly appreciate your support with any questions…

2 Likes