Message 1 of 2
Set a Type parameter in a loadable family

Not applicable
04-14-2016
06:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everybody !
I'm actually trying to set type parameter value in my Revit API. This parameters are declared as shared paramter.
I try something but it only able to change instance paramter...
' Get the handle of current document. Dim uidoc As UIDocument = commandData.Application.ActiveUIDocument Dim doc As Document = uidoc.Document ' Get the element selection of current document. Dim selection As Selection = uidoc.Selection Dim selectedIds As ICollection(Of ElementId) = uidoc.Selection.GetElementIds() For Each id As ElementId In selectedIds Dim e As Element = uidoc.Document.GetElement(id) Using y As New Transaction(doc, "Rens R") If y.Start = TransactionStatus.Started Then 'SD1 Dim Rparam1 As String = "Name_Of_Parameter" Dim Ridparam1 As IList(Of Parameter) = e.GetParameters(Rparam1) Dim Rparamvalue1 As Parameter = Ridparam1.First Rparamvalue1.Set(GlobalVariables.Param_Value) y.Commit() End Using Next
I almost sure that it's possible because i realised it with dynamo in Revit and it works.
Thank you for you precious help.
Best regards,
Yves