« Eliminating Compiler Warnings and Deprecated Calls | Main | ADN Revit API Training Material Update and Vacation »

February 15, 2013

Comments

Hi Jeremy,

Nice work, but i have a question. It's possible to hide the schedules of project using API?..

Thanks!

Dear Santos,

Yes, of course! You can simply delete them, just like any other element, can't you?

Cheers, Jeremy.

Hi Jeremy, I have a question.
Is it possible to retrieve the viewsheet from a ScheduleSheetInstance without iterating through all viewsheets?
I have 500 sheets and 7 ScheduleSheetInstance. It takes ten minutes to retrieve the seven ScheduleSheetInstances.

Thanks!

José Ignacio Montes

Ok, I´ve got it:
I only have to ask the ScheduleSheetInstance for its sheet through the property OwnerViewId;
I have 500 sheets and only 7 schedules. Goes a lot faster than going through all sheets:

ScheduleSheetInstance vsch =
viewSchedule as ScheduleSheetInstance;
ElementId shid = vsch.OwnerViewId;

Dear Jeremy,

How would you go about retrieving only the materials that are scheduled in a material takeoff schedule?
As you said above, inserting the ViewScheduleId as a filter in an elementscollector, in case of a material takeoff, retrieves the scheduled elements but also the entire material library..
This is annoying as I would like to make unique records of 'ElementId + MaterialId' for each entry in each material takeoff in the project, to check if the Revit user hasn't created duplicate measurements. This happens and can be quite a costly error.

Thanks in advance for any help or direction,

Kind regards,

Paulus

I got it to work, but it is quite ugly code, making use of some collectors and filters (if anyone cares to see it, be my guest =).

It would be a lot easier and save a lot of trouble if the API would be reprogrammed to only include the scheduled materials instead of the entire library.

There's no point in having the entire material library as the result of a schedulefilter, as you can get all materials simply by applying an OffCategory filter to a collector.

Kind regards,

Paulus

Dear Paulus,

Thank you for letting us know.

Yes indeed, I would love to take a look.

Maybe we can find some room for improvement and possibly even simplification.

Can you share it as a gist or something?

https://gist.github.com

Thank you!

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