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: 

Schedule - calculated value / field

31 REPLIES 31
Reply
Message 1 of 32
rayray4105
4072 Views, 31 Replies

Schedule - calculated value / field

hi,

 

Using the ScheduleDefinition.GetSchedulableFields it is possible to iterate through the available (shared) parameters and add or insert (addfield or insertfield) them to the created schedule.

 

However I wish to add a calculated value / calculated field to the schedule. This field does not show up in GetSchedulableFields because this field has to be added 'on the fly'. In the API there is a schedulefieldtype.formula member which suggest it may be possible to add a calculated field. Does anyone know how to add a calculated field because I am running out of ideas

 

regards,

Raymond

 

31 REPLIES 31
Message 2 of 32
jeremytammik
in reply to: rayray4105

Dear Raymond,

Yes, sorry, currently not possible. Revit 2013 provided a first stab at a schedule API, to be fledged out in future, e.g. to access individual values.

Cheers, Jeremy.



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

Message 3 of 32

Hi.

Is this possible in Revit 2014? I can find how  to add calculated fields.

Message 4 of 32

Sure. Look at the new SDK samples:

 

  • ScheduleAutomaticFormatter
  • ScheduleCreation
  • ScheduleToHTML

 

Best regards,

 

Jeremy



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

Message 5 of 32

Exactly, thank you. I habitually use the SDK 2013 and was looking for methods in documentation and forgot that there is already a new one Smiley Happy

Message 6 of 32

Unfortunately I still can't see what to do for creating calculated fields 😞

Message 7 of 32
kmiller
in reply to: YarUnderoaker

Anyone ever find the syntax and/or method for this?  I have been searching for hours and haven't found it yet.  Not on the forums or examples.  Basically I want to create a new field called "Height" and set it equal to an existing field called "Thickness".  Then going to hide the thickness columns/fields.  Common discipline of Length type if that matters at all.

 

Running 2015. 

-------------------------------------------------------------------------------------------------

If this response answers your question please click "Accept as Solution".
Message 8 of 32
jeremytammik
in reply to: kmiller

Dear Kmiller,

 

I searched the help for 'formula' and 'calculated' and could not find it.

 

All the field methods in the ScheduleDefinition class 'regular' fields that are apparently explicitly non-calculated.

 

I'll check with the development team, though.

 

Cheers,

 

Jeremy



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

Message 9 of 32
kmiller
in reply to: jeremytammik

Thank you - I also did a search of some items in the object model, or think I did it correctly and didn't come up with a whole lot.  Was hoping maybe it was named something different.

 

If this isn't available, is there any other options to get the same results?

-------------------------------------------------------------------------------------------------

If this response answers your question please click "Accept as Solution".
Message 10 of 32
haahhaah
in reply to: kmiller

Hello, i have been searching on this as well. Is this possible in Revit 2015 API? What i would like to achieve is to add a calculated value with formula into the schedule.

Message 11 of 32
kmiller
in reply to: jeremytammik

Hey Jeremy -

 

Did you get anywhere with checking with the development team on this? 

-------------------------------------------------------------------------------------------------

If this response answers your question please click "Accept as Solution".
Message 12 of 32
jeremytammik
in reply to: kmiller

Dear Kmiller,

 

I have not heard back from them yet.

 

I re-prompted for an answer now.

 

Cheers,

 

Jeremy



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

Message 13 of 32
Aaron.Lu
in reply to: rayray4105

Dear,

Currently both Revit 2015 and Revit 2016 cannot support adding formula fields and percentage fields.


Aaron Lu
Developer Technical Services
Autodesk Developer Network
Message 14 of 32
PhoneCoolie
in reply to: Aaron.Lu

Hi Aaron,

 

Any change in this for 2018? We really need to add calculated fields via the API.

 

An alternative option for us would be the ability to perform type conversions in the formula column of parameters for a family, eg text to weight.

 

Or even access to custom routines in the formula.

 

Best regards

Paul

Message 15 of 32
PhoneCoolie
in reply to: jeremytammik

Hi Jeremy,

 

 

Is there any change on this issue for 2018.1? (please see my last post to Aaron Lu).

 

Best regards

Paul

Message 16 of 32
Khaled.alyamany
in reply to: Aaron.Lu

Hi All,

 

Would really love to hear that it's been added in the Revit 2019? Any updates?

 

Best Regards,

Khaled

Message 17 of 32

All the most important enhancements are listed here and in the SDK documentation:

 

http://thebuildingcoder.typepad.com/blog/2018/04/whats-new-in-the-revit-2019-api.html

 



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

Message 18 of 32
PhoneCoolie
in reply to: jeremytammik

I guess that's a no then?

 

Best regards.

Paul

Message 19 of 32
jeremytammik
in reply to: PhoneCoolie

Dear Paul,

 

Is the functionality you are after provided by the Revit user interface?

 

If so, you have a good chance that it is available programmatically as well.

 

If you don't know, you might want ask about it in one of the user interface related forums instead:

 

https://forums.autodesk.com/t5/revit-api-forum/this-forum-is-for-revit-api-programming-questions-not...
 
The people there are much better equipped to answer your question than us programming nerds.
 
I hope this clarifies.
 
Best regards,
 
Jeremy

 



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

Message 20 of 32
PhoneCoolie
in reply to: jeremytammik

Hi Jeremy,

 

Thanks for the quick reply. In answer to your question, you can set up a calculated field via the UI, but up till now (as far as I know), not via the API.

 

Best regards

Paul

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