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
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.
Hi.
Is this possible in Revit 2014? I can find how to add calculated fields.
Sure. Look at the new SDK samples:
Best regards,
Jeremy
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
Unfortunately I still can't see what to do for creating calculated fields 😞
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.
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
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?
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.
Hey Jeremy -
Did you get anywhere with checking with the development team on this?
Dear Kmiller,
I have not heard back from them yet.
I re-prompted for an answer now.
Cheers,
Jeremy
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
Hi Jeremy,
Is there any change on this issue for 2018.1? (please see my last post to Aaron Lu).
Best regards
Paul
Hi All,
Would really love to hear that it's been added in the Revit 2019? Any updates?
Best Regards,
Khaled
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
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
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