A new window displays, with the Solution Explorer in the top right corner.
A graphical view of your dialog box displays in the Windows Form Designer. You can use this interface to add controls to your dialog box.
The ToolBox on the left side of the screen lists the controls that you can add to the dialog box. For this project, you add a TextBox to show the value of an Inventor parameter and allow you to edit that parameter.

Public Class Dialog1
Public d0 As Double
d0 = TextBox1.Text
Your code looks like -

Save or, alternatively, File
Save All. You are almost ready to build the project. When you perform the build operation, Visual Basic creates a DLL file. You can specify where Visual Basic creates this file by modifying the output path for the build operation.
Program Files\Autodesk\Inventor {version}\Bin\iLogicAdd\
AddReference "ClassLibrary1" Sub Main() dim dlg as new ClassLibrary1.Dialog1 dlg.d0 = d0 i = dlg.ShowDialog() if (i = vbOK)then d0 = dlg.d0 end if End Sub
This rule sends the current value of the Inventor parameter d0 to the dialog box, then shows the dialog box. The person using the dialog box can edit the value in the dialog. When this person clicks OK, the value from the dialog is assigned back to the parameter.
New Item
Dialog. A graphical view of your dialog box displays in the Windows Form Designer. You can use this interface to add controls to your dialog box.
Toolbox to preview the available controls. The code editor displays in a new subroutine named Dialog1_Load.
TextBox1.Text = d0
Public Class Dialog1
Public d0 As Double
d0 = TextBox1.Text
Your code now looks like -
Imports System.Windows.Forms Public Class Dialog1 Public d0 As Double Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click d0 = TextBox1.Text Me.DialogResult = System.Windows.Forms.DialogResult.OK Me.Close() End Sub Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel_Button.Click Me.DialogResult = System.Windows.Forms.DialogResult.Cancel Me.Close() End Sub Private Sub Dialog1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load TextBox1.Text = d0 End Sub End Class
Save All. A DLL is created when the project is built. You can either:
The following sample rule uses the dialog box:
AddReference "ClassLibrary1" Sub Main() dim dlg as new ClassLibrary1.Dialog1 dlg.d0 = d0 i = dlg.ShowDialog() if (i = vbOK) then d0= dlg.d0 end if End Sub
This rule sends the current value of the Inventor parameter d0 to the dialog box, and then shows the dialog box. The person using the dialog box can edit the value in the dialog box. If that person clicks OK, the value from the dialog box is assigned back to the parameter.
You can generate similar code for a dialog box automatically. On the Edit Rule dialog box, select the Wizards tab, and then select Create Rule for a Dialog.