NewElbowFitting returning null

NewElbowFitting returning null

GeomGym
Advocate Advocate
693 Views
3 Replies
Message 1 of 4

NewElbowFitting returning null

GeomGym
Advocate
Advocate

Jeremy's recent posts about rolling offsets of pipes has been pretty helpful for me to advance MEP importing.

http://thebuildingcoder.typepad.com/blog/2014/01/connecting-the-rolling-offset-pipe-to-its-neighbour...

 

But I get a null value returned from NewElbowFitting without an exception.  Can someone please help?

 

It's possible I need to set something up in the project, I'm not an expert with services by any means.

 

I've attached sample code and you can download revit project here:

http://geometrygym.wikidot.com/local--files/cloudfiles/140502%20two%20pipes.rvt

 

Thanks,

 

Jon

0 Likes
Accepted solutions (1)
694 Views
3 Replies
Replies (3)
Message 2 of 4

js1900
Contributor
Contributor
Accepted solution
Hi Jon,

Your code is correct, only the example model you attached contains pipe place holders, which do not have fittings, as such it's not supported to place an elbow fitting. I have tested with them as pipes and it does place the elbow as expected.

Will
0 Likes
Message 3 of 4

GeomGym
Advocate
Advocate

Hi Will,

 

Thanks for looking (and the answer is embarrasing).  I hadn't detected the place holders, I checked my original code and found the cause and it's now fixed.  Appreciate your response.

 

Cheers,

 

Jon

0 Likes
Message 4 of 4

js1900
Contributor
Contributor
No worries, I put it down the API swallowing the error, would've been really helpful if it raised an exception instead.
0 Likes