Message 1 of 11

Not applicable
06-26-2019
12:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I wanted to set custom parameter value on titleblock.
I tried following way,
Created one shared parameter - 'TestParameter'
Added one label on titleblock and assigned a shared parameter to it.
In project, added the same shared parameter under ProjectParameters with 'Sheets' as category.
FilteredElementCollector TitleBlocks = new FilteredElementCollector(Document).OfCategory(BuiltInCategory.OST_TitleBlocks).OwnedByView(ViewSheet.Id); Element elem = TitleBlocks.First(); Options opts = new Options(); opts.View = ViewSheet; IList<Parameter> P1 = elem.GetParameters("TestParameter"); if (P1.Count > 0) P1[0].Set(100);
But everytime I get P1 as null.
TIA
Solved! Go to Solution.