View Full Version : Schedule Keys
sfaust
2009-02-03, 07:20 PM
Is it possible to access schedule keys and add or modify the keys via the API?
Danny Polkinhorn
2009-02-04, 09:37 PM
I need this too. I was just discussing an API project this morning that may need access to keys, but I haven't had a chance to investigate. Opening VS now...
Danny Polkinhorn
2009-02-05, 02:54 AM
So, after more investigation time than I should have taken, here's what I found:
There is no exposed object type for "Keys" or "Key Schedules", so you cannot create new keys or key schedules.
A Key Schedule is just a view. Iterate through the existing project views and you'll find your key schedule. The View.Elements method will return all the keys as generic Element objects (as well as the ElementID which you'll need, see below). The parameters of each element contains the individual values for the keys, and the values seem to be read-write.
If you need to assign a key to an element in the model, say a room for example, then you need to assign the ElementID of the key to the corresponding parameter of the room.
I think that will do what I need (the last part), so hopefully this will help you too.
Danny Polkinhorn
2009-02-05, 03:00 AM
Interestingly, the View.Elements seems to also work for any other kind of schedule too. So, if you need all the Rooms in your project, just get all the View.Elements of a room schedule that lists what you need. While there are certainly better ways of doing this, with filters ideally, it could be useful for something.
sfaust
2009-02-05, 02:53 PM
hm, interesting. Thank you for the info, I'll look into it. Unfortunately for what I was looking at I would have to make new keys, so I guess that's a no go right now, but I can see this being useful for other things. Thanks
pfaudler
2010-02-10, 06:06 PM
Hi,
Has this been added to Revit2010API? I would like to create room key schedules and have export import functionallity like "Fire Rating Sample Code".
Thanks in anticipation.
regards
Danny Polkinhorn
2010-02-11, 10:03 PM
No, this is still not available in 2010 as far as I can tell. And my crystal ball is still murky too.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.