Get "Failed to insert elbow" when calling NewElbowFitting for cabletray

Get "Failed to insert elbow" when calling NewElbowFitting for cabletray

Anonymous
Not applicable
1,310 Views
3 Replies
Message 1 of 4

Get "Failed to insert elbow" when calling NewElbowFitting for cabletray

Anonymous
Not applicable

Hi expert, 

 

I want to create one fitting for cable tray, and reference the good artical from Jeremy:

http://thebuildingcoder.typepad.com/blog/2010/05/cable-tray-orientation-and-fittings.html#tpe-action...

 

But I found I always get "Failed to insert elbow" for the method -- NewElbowFitting for the sample code. Could you help me to get the reason?  I attached the project I used to test. 

 

Appreciate for your help.

 

thanks,

Gavin

0 Likes
1,311 Views
3 Replies
Replies (3)
Message 2 of 4

jeremytammik
Autodesk
Autodesk

Dear Gavin,

 

Thank you for your comment on The Building Coder and posting here to the Revit API discussion forum with sample code.

 

I am taking a look at the issue now for you.

 

Thank you for your patience.

 

Best regards,

 

Jeremy



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

0 Likes
Message 3 of 4

jeremytammik
Autodesk
Autodesk

Dear Gavin,

 

I downloaded, installed and debugged your sample code.

 

I took a look at it and cleaned it up a bit to make it more readable for me.

 

For instance, I removed unused assembly references and unnecccessary journaling and regeneration attributes.

 

My cleaned up version is available on GitHub, since I wanted to track the changes for you:

 

https://github.com/jeremytammik/CableTraySample

 

I note that you define several different commands. As far as I can tell, they all produce the same error message.

 

Some of them use rather weird coordinates to specify the cable tray and conduit locations, such as

 

XYZ start1 = new XYZ( -30.498257567, 38.420015690, 10.058014598 );

 

This is absolutely not recommended. Please understand the danger of floating point numbers, imprecision, and fuzziness.

 

Furthermore, please narrow down the list of commands to look at to one single specific one.

 

I currently do not know which one to look at.

 

Thank you!

 

Best regards,

 

Jeremy

 



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

0 Likes
Message 4 of 4

Anonymous
Not applicable

Hi  Jeremy,

 

The code is from your blog: Cable Tray Orientation and Fittings. Sorry for that I don't split them out to one sample for your investigation. I will have a look these days, and give you one feedback.

 

Thanks again for your help.

 

Gavin

0 Likes