Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I know this is an old question, I browsed through the solution but I am still having a lot of trouble trying to commit changes to a global parameter from an external application.
Can someone help me figure it out what code should i place in this module, to be able to make this transaction ?
below is my code.. I simplified it to make it more easy to focus on a solution 🙂
Module Module1
Public Sub Set_global_param()
Dim GPlist As ISet(Of ElementId) = GlobalParametersManager.GetAllGlobalParameters(Revit_doc)
For Each item As ElementId In GPlist
Dim gpParam As GlobalParameter = TryCast(Revit_doc.GetElement(item), GlobalParameter)
Dim gpName As String = gpParam.Name
If gpName = "Param1" Then
gpParam.SetValue(New DoubleParameterValue(111))
End If
Next
End Sub
End Module
Solved! Go to Solution.