Questions about the length for "Wire BuiltInParameter.CURVE_ELEM_LENGTH"

Questions about the length for "Wire BuiltInParameter.CURVE_ELEM_LENGTH"

Anonymous
Not applicable
672 Views
4 Replies
Message 1 of 5

Questions about the length for "Wire BuiltInParameter.CURVE_ELEM_LENGTH"

Anonymous
Not applicable

Dear all,

 

I want to get the length of the wire, but I found that regardless of any kind of wire type (arc, spline, chamfered), length is always the starting point to the end point of a length, how do I ask to get the actual length?

 

Lin

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

jeremytammik
Autodesk
Autodesk

Dear Lin,

 

Thank you for your query.

 

I assume that the length you are currently retrieving is the vlue of the Curve.Length property?

 

That will almost certainly return the length of the curve element representing the wire, and not the actual wire length itself.

 

If the wire length is available at all in the model, I would assume that it is stored in some parameter attached to the wire element.

 

Do you see the wire length that you are after anywhere in the user interface? If not, it is probably not available programmatically either. If you see it, what is the exact user interface path to view and possibly modify it, please?

 

I would suggest that you use RevitLookup and, if necessary, the other more interactive database exploration possbilities to drill down into the model and determine where it might be stored:

 

http://thebuildingcoder.typepad.com/blog/2013/11/intimate-revit-database-exploration-with-the-python...

 

I hope this helps.

 

Best regards,

 

Jeremy



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

0 Likes
Message 3 of 5

Anonymous
Not applicable

Isn't wiring and other similar components countable? So that each instance you have of object equals to prespecified length and to get total length you just have to count the instances of this specific wire? I remember getting the amount of some other material roughly the same way.

0 Likes
Message 4 of 5

Anonymous
Not applicable

Dear Jeremy,

 

Yes, I get length form Curve.Length property, but It's not actual wire length, so how can I get actual wire length, thank you.

 

Thanks

Lin

0 Likes
Message 5 of 5

TheRealChrisHildebran
Advocate
Advocate

Curious if you ever found an answer to your question about Wire Length.

 

I also need to lenght of each segment of wire not the whole length.

 

Thanks!

0 Likes