Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is there a way to output the total (sum) length of each pipe size in a schedule?

1 REPLY 1
SOLVED
Reply
Message 1 of 2
nur91m
737 Views, 1 Reply

Is there a way to output the total (sum) length of each pipe size in a schedule?

First question  -  Is there a way to output the total (sum) length of each pipe size in a schedule with API? 

Second question - How can I format a field? For example I want to set the length unit in meters not millimiters.

1 REPLY 1
Message 2 of 2
jeremytammik
in reply to: nur91m

Dear nur91m,

 

1. http://thebuildingcoder.typepad.com/blog/2012/05/the-schedule-api-and-access-to-schedule-data.html

 

2. http://thebuildingcoder.typepad.com/blog/2013/04/whats-new-in-the-revit-2014-api.html

 

Unit Formatting and Parsing

The methods:

  • UnitFormatUtils.FormatValueToString()
  • UnitFormatUtils.TryParse()


provide the ability to format a value into a string based on formatting options and to parse a formatted string (including units) into a value if possible.


Unit Conversion

The new class UnitUtils contains methods to convert between unit types:

  • UnitUtils.Convert() – Converts a value from one unit type to another, such as square feet to square meters.
  • UnitUtils.ConvertFromInternalUnits() – Converts a value from Revit's internal unit type.
  • UnitUtils.ConvertToInternalUnits() – Converts a value to Revit's internal unit type.

Best regards,

 

Jeremy



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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community