Set Positioning options while linking CAD file in Revit

Set Positioning options while linking CAD file in Revit

MehtaRajesh
Advocate Advocate
930 Views
6 Replies
Message 1 of 7

Set Positioning options while linking CAD file in Revit

MehtaRajesh
Advocate
Advocate

Hi,

Can I able to programatically set following Positioning options while  linking CAD file in Revit ?

(1) Auto - Center to Center
(2) Auto - Origin to Origin
(3) Manual - Origin
(4) Manual - Base Point
(5) Manual - Center

Thanks in advance for all the kind support in this regards,

Regards,
Rajesh

0 Likes
931 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable
Did a little googling.
http://revitapisearch.com/html/73b7f0c5-a18a-0051-0be9-5f067415b718.htm

I can see ImportPlacement, but not specific the options you want but maybe they are in this class, haven't tried it.

http://revitapisearch.com/html/3c54b2eb-2378-c692-4c00-46088b684604.htm

maybe this helps
0 Likes
Message 3 of 7

MehtaRajesh
Advocate
Advocate


Hi,

We need to link Revit file with shared coordiante, but we have not found option for doing it programmatically.

Thanks a lot for kind help and support in this regards,

Warm Regards,
Rajesh

0 Likes
Message 4 of 7

Anonymous
Not applicable

Hi @MehtaRajesh,

 

I'm trying to enable my script to chose the positioning of the file that is going to be linked. Did you find a solution?

 

I had a look at the APIs but I didn't really see much.

 

Thanks,

 

Andrea

0 Likes
Message 5 of 7

MehtaRajesh
Advocate
Advocate

No, I have not found

0 Likes
Message 6 of 7

RPTHOMAS108
Mentor
Mentor

Not sure about CAD files but Revit link instances can apparently be inserted by shared co-ordinates or have such a system set up via the API.

 

To set up shared co-ordinate system use

Document.PublishCoordinates (Since 2018)
or
Document.AcquireCoordinates (Since 2018)

 

Just like in UI you would have to move instance to the correct relative location before using either of the above.

 

To create an instance of a link (where an existing shared relationship exists) use:

 

RevitLinkInstance.Create Method(Document, ElementId, ImportPlacement) (Since 2013)
(ImportPlacement.Shared)

Message 7 of 7

Anonymous
Not applicable

Thanks @RPTHOMAS108,

 

Great that you spotted it...exactly what I was looking for!

0 Likes