Schedule - calculated value / field

Schedule - calculated value / field

Anonymous
Not applicable
5,611 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,612 Views
31 Replies
Replies (31)
Message 21 of 32

jeremytammik
Autodesk
Autodesk

I'm checking with the development team for you...

 



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

0 Likes
Message 22 of 32

adam.krug
Advocate
Advocate

Maybe someone should post such Revit Idea...

0 Likes
Message 23 of 32

jeremytammik
Autodesk
Autodesk

Dear Adam,

 

Thank you very much for the good suggestion!

 

You just beat me to suggest the same thing.

 

The development team replied to my update and say:

 

It is not yet implemented.

 

It is tracked as development issue CF-1731, associated with the following ADN cases and discussion forum threads:

 

 

However, I do not see an entry for it in the Revit Idea Station:

 

https://forums.autodesk.com/t5/forums/searchpage/tab/message?filter=location&q=schedule%20calculated...

 

Please submit a wish list entry for it there and ensure it gets many votes.

 

That will help raise its priority with the development team.

 

Thank you!

 

Cheers,

 

Jeremy

 



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

0 Likes
Message 24 of 32

adam.krug
Advocate
Advocate

Here it is:

 

API calculated value - Revit Idea

 

You can vote now.

0 Likes
Message 25 of 32

kmiller
Collaborator
Collaborator

Thanks for reviving this.  Voted up!

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

If this response answers your question please click "Accept as Solution".
0 Likes
Message 26 of 32

Anonymous
Not applicable

Maybe TableSectionData.SetCellCalculatedValue does the trick ?

 

In my case i need to transfer values from combined- and calculated fields back to the elements.
For combined fields its pretty straightforward as the API gives you the "combine" setup. (TableCellCombinedParameterData)
As I can safely assume the same rules applies to all elements in the schedules, I dont need to map schedule rows to elements in the model.

 

For calculated fields you dont get a "setup" as far as i can see.
So you need to map schedule rows to elements.
The only way i can think of is putting the ElementId as a column in the schedule.
Then use GetCellText or whatever to get the value of the formula. (Or parse a exported schedule back in)

Just getting the underlying formula as a string would help.
Then we could recreate the value without the need for mapping rows.

 

Part of why this transfer is needed is because the IFC exporter does not export those kind of fields.

 

0 Likes
Message 27 of 32

Anonymous
Not applicable
Can we add calculated fields to schedule in Revit 2019 or 2020?
Message 28 of 32

Anonymous
Not applicable

Hi @jeremytammik ,

 I have been looking on this too. Is this conceivable in Revit 2021 API? 

I also want to add a calculated field to the schedule. 

0 Likes
Message 29 of 32

jeremy_tammik
Alumni
Alumni

Whenever you require new or enhanced functionality, the Revit Idea Station is the place to go.

 

Please search there for a corresponding wish list entry for the suggested functionality and add your comments to it, or create a new one, if none already exists:

 

https://forums.autodesk.com/t5/revit-ideas/idb-p/302

 

Tag it as an API wish:

 

https://forums.autodesk.com/t5/revit-ideas/idb-p/302/tab/most-recent/label-name/api

 

Ensure it gets as many votes as possible to underline its importance to you and the rest of the developer community.

 

The Revit Idea Station is currently one of the main driving input forces for Revit API enhancements.

 

The Revit development team look there. Your comment here in the discussion forum might be overlooked.

 

Thank you!

 

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 30 of 32

adam.krug
Advocate
Advocate
0 Likes
Message 31 of 32

adam.krug
Advocate
Advocate

It doesn't seem that I can edit it to tag as an API wish.

0 Likes
Message 32 of 32

Anonymous
Not applicable

@jeremy_tammik Thank you for useful information.

@adam.krug I have added the tag as "API WISH" on your submitted idea.

 

0 Likes