Message 1 of 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
hi,
I am trying to make something, but I am not succeeding.
In a rule I create temporary paramter. In this case it contains 2 options. Then I open a form. The idea is that if you switch options, you get to see different info. In a message box I get the desired result, only the form does not update.
Is there any way to update the form so that it shows the updated parameter?
Sub main TempDiscription = ThisApplication.ActiveDocument.ComponentDefinition.Parameters.UserParameters.AddByValue("TempDiscriptionValue", "", UnitsTypeEnum.kTextUnits) Dim oModelEvent As ModelingEvents oModelEvent = ThisApplication.ModelingEvents AddHandler oModelEvent.OnParameterChange, AddressOf oModelEvent_ParameterChange ' Make temp list MakeTempList() ' Open the form Dim Form As FormReturnValue = iLogicForm.Show("Form 1", FormMode.Modal) ' Delete temp ipropertie/parameter ThisDoc.Document.ComponentDefinition.Parameters.Item("TempList").delete ThisDoc.Document.ComponentDefinition.Parameters.Item("TempDiscriptionValue").delete RemoveHandler oModelEvent.OnParameterChange, AddressOf oModelEvent_ParameterChange End Sub Sub oModelEvent_ParameterChange(DocumentObject As _Document, Parameter As Parameter, BeforeOrAfter As EventTimingEnum, Context As NameValueMap, ByRef HandlingCode As HandlingCodeEnum) If BeforeOrAfter <> kAfter Then Exit Sub Dim DiscriptionList As New ArrayList DiscriptionList.Add("Option1;Discripton1") DiscriptionList.Add("Option2;Discription2") For Each aItem In DiscriptionList If aItem.Contains(Parameter.Value) Then arr = Split(aItem, ";") TempDiscriptionValue = arr(1) MessageBox.Show(TempDiscriptionValue, "What i want to see in the form") End If Next End Sub Sub MakeTempList() Dim OptionTempList As New ArrayList OptionTempList.Add("Option1") OptionTempList.Add("Option2") ' make custom parameter TempListOptions = ThisApplication.ActiveDocument.ComponentDefinition.Parameters.UserParameters.AddByValue("TempList", "Option1", UnitsTypeEnum.kTextUnits) ' fill custom parameter MultiValue.List("TempList") = OptionTempList End Sub
I want to use this to display a list of materials to choose from. Depending on the material chosen, I then want to display the properties. Therefore, I use temporary parameters
Solved! Go to Solution.