Shared parameter to schedulable field and room:name field

Shared parameter to schedulable field and room:name field

FrankHolidaytoiling
Advocate Advocate
1,044 Views
3 Replies
Message 1 of 4

Shared parameter to schedulable field and room:name field

FrankHolidaytoiling
Advocate
Advocate

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

0 Likes
Accepted solutions (2)
1,045 Views
3 Replies
Replies (3)
Message 2 of 4

FrankHolidaytoiling
Advocate
Advocate
Accepted solution

the room parameter is simply a builtinparameter, called room_number

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

0 Likes
Message 3 of 4

matthew_taylor
Advisor
Advisor
Accepted solution

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?
0 Likes
Message 4 of 4

FrankHolidaytoiling
Advocate
Advocate

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

0 Likes