Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Shared parameter to schedulable field and room:name field

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
FrankHolidaytoiling
780 Views, 3 Replies

Shared parameter to schedulable field and room:name field

Hi,

I would like to add shared parameters to a schedule and then the room parameters that you can grab from a multi-category schedule like room:name etc.

Is this possible? If so how do I find a shared parameter fromthe project, do i use the guid?

 

AddRegularFieldToSchedule(viewschedule, new ElementId( ?));

 

cheers,

Fabio

3 REPLIES 3
Message 2 of 4

the room parameter is simply a builtinparameter, called room_number

so adding shared parameters to the schedulable fields is now my issue

Message 3 of 4

Hi @FrankHolidaytoiling,

I'm pretty sure there's a really good example of this in the SDK.

 

Here are a few starter lines that should either solve your problem or give you some keywords to start your search:

 

Dim schedulableFields As IList(Of DB.SchedulableField) = viewSched.Definition.GetSchedulableFields()

Dim field0 As DB.SchedulableField = schedulableFields.Where(Function(sf) sf.GetName(doc) = "NameOfParameter).FirstOrDefault
Dim scheduleField0 As DB.ScheduleField = viewSched.Definition.AddField(field0)
          

 

A quick search on TheBuildingCoder should yield further results.

 

Cheers,

 

-Matt

 

[Edit: wording fix]


Cheers,

-Matt
_______________________________________________________________________________
Marking a post as a 'solution' helps the community. Giving a post 'Kudos' is as good as saying thanks. Why not do both?
Message 4 of 4

I searched for eons for the parchment daniel jackson, many scholarly thanx!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Rail Community