Pipe Reference

Pipe Reference

patild
Contributor Contributor
956 Views
4 Replies
Message 1 of 5

Pipe Reference

patild
Contributor
Contributor

Hello Guys,

                    I need one help, How to get Reference of Pipe without using prompt method.

 

 

Thanks.

                       

0 Likes
957 Views
4 Replies
Replies (4)
Message 2 of 5

ollikat
Collaborator
Collaborator
Hi.

A bit uncertain what you are after. But if you mean Reference object from the API, it has a constructor which takes an element. To get the element, you probably need to know the id of the element you are interested about.

If this doesn't help, could you describe you situation a bit more us to understand what you should do next.
0 Likes
Message 3 of 5

patild
Contributor
Contributor

Thanks for the reply.

 

I m using like this :

 

Doc.Create.NewAlignment(Doc.ActiveView, refPlane.Reference, new Reference(pipe));

 

But is giving error "One of the conditions for the inputs was not satisfied. Consult the documentation for requirements for each argument."

 

Its looking easy by manual process but i m struggling with API. 😞

 

Manual Alignment Process

 

 

Please help.

Thanks.

0 Likes
Message 4 of 5

ollikat
Collaborator
Collaborator
The API documentation says:

"These two references must be one of the following combinations:

2 planar faces
planar face and reference plane
2 lines
line and point
line and reference plane
2 arcs
2 cylindrical faces

These references must be already geometrically aligned (this function will not force them to become aligned)."

So I believe that you can't use pipe element directly. You need to somehow get the corresponding line object I guess. But unfortunately I can't say more because otherwise I don't have a clear idea, what's the purpose of this functionality in Revit.

Maybe someone else has done something similar in the past...?
0 Likes
Message 5 of 5

nitinjambhale
Advocate
Advocate
i was also trying for the alignment of two elements through API, but unfortunately i didn't find any. Would this be the wishlist contender?
0 Likes