Schedule - calculated value / field

Schedule - calculated value / field

Anonymous
Not applicable
5,585 Views
31 Replies
Message 1 of 32

Schedule - calculated value / field

Anonymous
Not applicable

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

 

0 Likes
5,586 Views
31 Replies
Replies (31)
Message 2 of 32

jeremytammik
Autodesk
Autodesk

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

0 Likes
Message 3 of 32

YarUnderoaker
Collaborator
Collaborator

Hi.

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

0 Likes
Message 4 of 32

jeremytammik
Autodesk
Autodesk

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

0 Likes
Message 5 of 32

YarUnderoaker
Collaborator
Collaborator

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

0 Likes
Message 6 of 32

YarUnderoaker
Collaborator
Collaborator

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

0 Likes
Message 7 of 32

kmiller
Collaborator
Collaborator

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".
0 Likes
Message 8 of 32

jeremytammik
Autodesk
Autodesk

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

0 Likes
Message 9 of 32

kmiller
Collaborator
Collaborator

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".
0 Likes
Message 10 of 32

Anonymous
Not applicable

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.

0 Likes
Message 11 of 32

kmiller
Collaborator
Collaborator

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".
0 Likes
Message 12 of 32

jeremytammik
Autodesk
Autodesk

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

0 Likes
Message 13 of 32

Aaron.Lu
Autodesk
Autodesk
Dear,

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


Aaron Lu
Developer Technical Services
Autodesk Developer Network
0 Likes
Message 14 of 32

Anonymous
Not applicable

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

0 Likes
Message 15 of 32

Anonymous
Not applicable

Hi Jeremy,

 

 

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

 

Best regards

Paul

0 Likes
Message 16 of 32

Anonymous
Not applicable

Hi All,

 

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

 

Best Regards,

Khaled

0 Likes
Message 17 of 32

jeremytammik
Autodesk
Autodesk

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

Anonymous
Not applicable

I guess that's a no then?

 

Best regards.

Paul

0 Likes
Message 19 of 32

jeremytammik
Autodesk
Autodesk

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

0 Likes
Message 20 of 32

Anonymous
Not applicable

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

0 Likes