« BIM 360 Glue REST API Authentication Using Python | Main | ToElementIds Performance »

December 12, 2012

Comments

Yes Guy pointed that out to me a few months ago as well.

A Fantastic tip that speed things up no end :)

Dear Phillip,

Yes, thank you for asking at the time. I hope it is of similar use to others as well :-)

Cheers, Jeremy.

Dear Jeremy,

Could u please provide some sample code to illustrate this new feature in 2013 API to extract data from schedules. (Without going through the export procedure).

Thanks

Dear AbdulNaafay,

Sure. Here it is:

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

Cheers, Jeremy.

Dear Jeremy,

Thank you. I would like to know if it is possible to directly iterate through the rows in a schedule to extract data without the need of exporting it to text file and reading the data from the file.

Dear AbdulNaafay,

Ok, I see. Perfectly valid request, of course. Sorry, not right now. This is an obvious wish list item to enhance the existing functionality, though, so it is sure to come soon.

Cheers, Jeremy.

Is it possible to set the appearance of a viewschedule (IE. fonts)? I found a parameter called "appearance" but it is null.

Dear Paul,

Not right now, sorry to say. Perfectly valid request, of course. This is an obvious wish list item to enhance the existing functionality, though, which was only just added in the last release, so it is probable to come soon.

Cheers, Jeremy.

Hi Jeremy.
Thanks a lot for the post. Thats exactly that I need!
I wanted to determined Schedules on a Sheet and could not find how to retrieve its via API.

The solution is:
FilteredElementCollector col2 =
new FilteredElementCollector(doc, viewSheet.Id);
var scheduleSheets =
col2
.OfClass(typeof(ScheduleSheetInstance))
.OfType()
.ToList();

foreach (var scheduleSheetInstance in scheduleSheets)
{
if (scheduleSheetInstance.ScheduleId != ElementId.InvalidElementId)
{
var schedule =
doc.GetElement(scheduleSheetInstance.ScheduleId) as ViewSchedule;
}
}

To get all elements belong to Schedule:
var elementsOnSchedule =
col2
.WhereElementIsNotElementType()
.ToElements()
.Where(e=>!(e is Material))
.ToList();

I don't know why, but on default all schedules include all materials in the project. I exclude it by .Where(e=>!(e is Material)). If you know, please explain.

Regards,
Victor.

P.S. Sorry. The angle brackets have disappeared:(

Dear Victor,

Thank you for the information. Do you think we should publish this as a separate post? Might it be useful to others as well? If so, please email me a solution and maybe a little sample model to test it on, and I will promote this to a main blog post on its own.

Thank you!

Cheers, Jeremy.

Hi Jeremy,

I was wondering, in regards to Revit Schedules, can you access the element that defines rows in a schedule?

for instance, if you have sorted a schedule and suppressed the instances so that the count for each row is greater than one, can you create a collection of elements and set the collections mark value?

or do you need to some how programmatically identify the sorting being applied and run the transaction separately and ignore the schedule completely?

Thanks Much!!

Dear Matthew,

Thank you for posting this as a comment.

I am not aware of any such element that controls the schedule behaviour.

To find out whether it works the way you suggest, I would set up the required situation manually through the user interface and then explore it using RevitLookup, the BipChecker, the interactive Python or Ruby shell, and any other tools that you find useful to detect the differences.

That might tell you how to achieve your manual adjustment programmatically as well, if you are lucky and it is possible at all.

What are you actually trying to achieve? Do you have to have the results displayed in a schedule like this, or are you only after the results themselves? Do you have to modify an existing schedule, or could you simply set up a completely new schedule satisfying your needs?

As far as I am aware, the schedule creation API enables you to set up all possible kinds of schedules. I may be wrong, though.

Please let us know what you find out. Thank you.

Cheers, Jeremy.

I was trying to have a value populate similar to a mark value. When a set of criteria was met, the value would be "A1" or "A2" etc. to shortcut the process, i wanted to use the existing schedule to accomplish the goal.

Hi Jeremy,

Unfortunately, this technique does not work if the schedule includes elements from RVT Links and it is those elements that you want to obtain.

Harry

Dear Harry,

Happy New Year to you!

Oh dear, that sounds bad. Are you aware of any possible workaround?

Cheers, Jeremy.

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

Your Information

(Name and email address are required. Email address will not be displayed with the comment.)

Jeremy Tammik

AboutTopicsIndexSource