Rules and Forms

What is the iLogic Browser?

The iLogic Browser lists iLogic rules, forms, global forms and external rules.

A context menu is available for items in the iLogic Browser. The commands included in the menu vary depending on the item selected.

  • If the browser is displayed when Autodesk Inventor is shut down, it is shown again (empty) when Autodesk Inventor is restarted.
  • If a document is activated that does not support rules or forms (such as a presentation), or if Autodesk Inventor is in the “no document” state, then the browser window is empty except for the "iLogic" title. This convention is like the model browser in the no-document state.
  • If a document is activated that supports rules and forms, the tabs are shown whether or not rules or form definitions exist in the active document.

In the iLogic Browser, rules are arranged under two tabs:

  • The Rules tab lists all rules stored in the document.
  • The External Rules tab lists all rules stored outside of Inventor (on disk), regardless of the open document.

Forms are arranged under two tabs:

  • The Forms tab lists all forms and buttons to trigger rules stored in the current document.
  • The Global Forms tab lists all forms and buttons to trigger rules stored outside of Inventor, regardless of the open document.

Once the iLogic Browser is shown, it remains displayed until closed manually. This setting is retained across sessions.

The visibility of the iLogic Browser can be toggled on and off by activating or deactivating the iLogic Browser check box. This check box can be found in the User Interface drop-down list located on the Windows panel of the View tab.

Additionally, you can dock the iLogic Browser on either side of the Autodesk Inventor window.

Rules

What are rules?

A rule is a small Visual Basic (VB.NET) program that can monitor and control other Inventor parameters, features, or components.

How do rules work?

iLogic embeds rules as objects directly into part, assembly, and drawing documents. The rules determine and drive the design parameter and attribute values. By controlling these values, you can define the behavior of model attributes, features, and components. Knowledge is saved and stored directly in the documents, like the way in which geometric design elements are stored.

Parameters in rules

You can use standard Inventor parameter names in rules as Visual Basic variables. When you run the rule, the value of the parameter is assigned to the variable. For a numeric parameter, the value is a real number expressed in the document units specified in Tools Document Settings. Text parameters become String variables in the rule. True/false parameters become Boolean variables.

Parameters can appear in two different ways:

  • VB.NET variables that are linked to numeric or non-numeric parameters. The variables are highlighted in blue:

    When a rule starts running, iLogic reads the values for these parameters from the model into the rule. When the rule has finished running, iLogic saves the changed values back to the model.

    To save the values before the rule has finished running, use the RuleParametersOutput function. This function is useful if you want to change the model immediately.

  • Parameters accessed using the Parameter function. For example:

    When you assign values using this method, the values are saved to the model immediately, before the next line in the rule runs. When you read a value using the Parameter function, it is immediately read from the Inventor model.

Change default entity names in rules

Before you use one of the following Autodesk Inventor entity names in a rule, change its name if it was assigned a default name when it was created:

  • feature
  • sketch
  • work feature
  • pattern
  • constraint
  • iMate

Use a meaningful name. The name change makes it easier for yourself and others using the model to see what the rule is doing.

Another reason to change default names is to make them more portable. In localized versions of Autodesk Inventor, default item names are translated to the language of that version. The names are automatically changed in the model browser, but not in an iLogic rule. Therefore, the rule may be unable to find items using the default name. If someone else uses the model in a different language version of Inventor, the default names must be changed. This recommendation applies only to items that are called out by name in the rule. For example, the Measure functions can use work feature names. If you have work features, but you do not use them in Measure functions, then you do not have to rename them.One exception to this recommendation is embedded Excel spreadsheets. Do not rename them.

On non-English versions of Autodesk Inventor, use an English name in the rule. For example:

"3rd Party:Embedding 1"
NoteSome entities such as iMates allow you to specify a name when you create them.

When does a rule run?

Rules usually run automatically in response to changes in parameter values, if the parameters are used directly as variables in the rule. You can also trigger rules by events.

A rule runs immediately after you edit it, unless it is suppressed. When rules run, changes in the parameters do not update the model until after the rule runs. If necessary, you can force parameter changes to take effect immediately using either:

  • the Parameter function
  • the RuleParametersOutput() function in the rule

Rule order

  • Rules are run in the order in which they appear in the browser, unless specified otherwise by inclusion of the iLogicVb.RunRule("ruleName") function.
  • If more than one rule references a parameter that changes, the rule that appears first in the list runs first. It happens regardless of how the parameter is changed.
  • You can use the Event Triggers command to change the rule order in the list associated with document events, independent of the main iLogic Browser list.

How is a rule processed?

When you create or edit a rule, the rule text is converted into valid VB.NET code and then compiled. Some Inventor parameter names are not valid as VB.NET variable names. To allow for the full range of Inventor parameter names, iLogic internally substitutes new variable names for the Inventor parameters.

Keywords used as parameter names

Although you can use Visual Basic keywords as parameter names, it is not recommended for new documents. However, when you add rules to existing documents, you usually do not have to change any parameter names. If a name is the same as a keyword, and you require that keyword in the rule, you can:

  • Change the Inventor parameter name, if possible (recommended).
  • Use the keyword in the rule, but with different letters capitalized. For example, use Class if the Inventor parameter is named class. Inventor parameter names are case-sensitive, but VB is not. In our example, class is replaced with another name before VB sees the code, but Class remains intact.

Internal conversion of rules

Rule text is converted internally to valid VB.NET code, which is not visible and is stored with the rule. This type of storage eliminates the need for iLogic to generate the code whenever the rule is run. The code only changes when you edit the rule.

The VB compiler error messages actually refer to this intermediate code. In rare cases with some complex code, you can receive an error that does not correspond to the rule code. When this situation occurs, simplify your code. If necessary, verify that you have a Sub Main() and End Sub statement.

When iLogic converts the rule to valid VB.NET code for compilation, it replaces units with conversion factors.

Units in rules

You can use Inventor units in rules in the same manner as they are used in standard Inventor parameter equations.

  • Rules do not require units. For example, suppose a number is assigned to a parameter that is not unitless, but no units are specified in the expression. In this case, iLogic assumes that the number uses the document units that conform to the parameter. This type of assumption also applies to compound units, such as mi/hr. Document units are set in Tools Document Settings Units in Inventor.
  • Unit names can only be used directly after numbers in the rule text. They cannot be used after parameters, variables, or expressions.

Example - document units

In this example, a part file uses document units of inches:

d0 = 4.5 in
d18 = 7.2 in
sum = d0 + d18MessageBox.Show(sum,”Document Units - Inches”)

Unless otherwise specified, iLogic assumes the units of the numbers are defined as the document units. In this case, the sum equals 11.7. A message box displays the value and indicates that the document units are expressed in inches.

To assign a value of 7.2 mm to the parameter d18, instead of 7.2 in, specify that d18 is expressed in millimeters:

d0 = 4.5 in
d18 = 7.2 mm
sum = d0 + d18
MessageBox.Show(sum,”Document Units - Inches”)

In this case, the sum equals 4.78346456692913. A message box displays the value and indicates that the Document Units are expressed in inches

To perform the previous calculation for a part file with document units expressed in millimeters, include the inch unit for any parameter expressed in inches (such as d0 = 4.5 in).

Finally, if you omit the unit of length from a statement, iLogic uses the Document Units value.

Example - mixed document units

In this example, a part file uses document units of inches. In the iLogic Parameter Editor:

  • parameter x is set to 1 in
  • parameter y is set to 12.5 mm

A rule has been written as:

result = x + y
MessageBox.Show(result,“Mixed Units Defined in Parameter Editor”)

When performing the addition, iLogic converts the value of parameter y from 12.5 mm to .4921 inches. A message box displays the value of 1.49212598425197 and indicates that mixed units are defined in the Parameter Editor.

Conversely, if the document units are defined as millimeters, then iLogic converts the value of parameter x from 1 in to 25.4 mm. A message box displays the value of 37.9 and indicates that mixed units are defined in the Parameter Editor.

Unit names

The unit specification is applied before any other mathematical operation is performed and has precedence over all other operators. Unit names:

  • can only be used directly after numbers in the rule text
  • cannot be used after parameters, variables, or expressions
  • must include a space between the number and the unit.

The following are examples of valid use of unit names:

12 in
144 in
144 in^2
125.2 mm
60 mi/hr

You can use compound unit specifications in rules. Compound unit specifications follow the Inventor format. To incorporate a complicated unit specification into a rule, create an equation for it in the Parameters dialog box. Then, use Capture Current State on that parameter in the Rule Editor.

External rules

External rules can be used as iLogic rules, or as small programs that are run manually (like VBA macros). They are stored in text or VB files, outside of any Inventor document (part, assembly, or drawing). You can run them manually or from other rules.

When you view the list of external rules in the iLogic Browser, the list is the same for whatever document you have open. It is not tied to each individual document.

You can also run external rules as event-driven rules.

Wizards

iLogic provides several wizards you can use to create sophisticated rules for certain tasks. These wizards are available on the Wizards tab of the Edit Rule dialog box:

  • Create Rule for a Dialog - Use a custom dialog box to drive parameter values.
  • Capture Current View - Capture view orientation and zoom display values.
  • Message Box - Create a rule that displays a Windows message box.
  • Parameter Limits - Set minimum and maximum values for parameters.

Forms

What are forms?

Create and connect a custom user interface to the parameters, properties, and rules of an Inventor part, assembly or drawing document. Use drag and drop methods to design a user interface with no need for programming. Use the controls to drive changes to an existing design. Form definitions can be document specific and saved with a design document or stored for use across multiple documents.

NoteIt is not necessary to have rules to create forms.

Procedures

Work with rules

Create a rule

Before you create a rule, first create any parameters that you want to include in the rule.

  1. On the ribbon, click Manage tabiLogic panel Add Rule.
  2. In the Rule Name dialog box, enter the name of the new rule, and click OK.
  3. Use the Edit Rule dialog box to define the rule.
    • In a part or drawing document, click a parameter group to display that list of parameters in the Parameters tab on the right. Then, double-click a parameter in the list to insert that name into the rule text.

      In an assembly document, select the 3D Model tab to display the assembly components, or select the File Tree tab to display the subassembly and part files. Expand a part file item to display the parameters and features within that file.

      NoteWhen you click a non-parameter item in the Model tree, its name is listed under the Names tab (next to the Parameters tab). You can double-click an item in this list to insert the name into the rule. Many of the Drawing snippets require a view name. Double-clicking on the appropriate item in the list can provide you with a view name from the current drawing for inclusion into the rule.
    • Right-click on an item, and select Capture Current State to insert text into the rule that assigns values to the item.

      For example, capture the current state of a parameter to insert the parameter and its current value, such as d0 = 4.0 in.

      Parameters are always captured with their units, but units are not required when you write new equations. You can right-click on a parameter group to capture the state of all parameters of a specific type. You can also right-click on a feature or component to capture its current IsActive state (suppressed or unsuppressed).

    • Use the snippets listed under the System and Custom tab in the Snippets area to add functions which can then be customized for the rule. Double-click a snippet to add it to the rule.
    • Use the choices on the editing toolbar above the rule text area to manipulate the appearance of the rule. You can also use the choices to insert conditional statements, keywords, and operators.
  4. Click OK to save the rule.

Edit a rule

  1. On the ribbon, click Manage tabiLogic panel iLogic Browser if the browser is not currently displayed.
  2. In the iLogic Browser, click the Rules tab to edit a rule in the open document. Or, click the External Rules tab to edit a rule for the component that is in an external file.
  3. Double-click the rule, or right-click and select Edit Rule from the context menu.
  4. Use the Edit Rule dialog box to edit the rule. As you enter text, the appropriate color coding is applied to your text for readability.
  5. Click OK when finished.

Rename a rule

To rename a rule, click twice slowly (two discrete clicks) on the name in the iLogic Browser to enable editing, and then change the existing name.

Insert rule syntax

Use the drop-down lists on the toolbar above the rule text area within the Edit Rule dialog box to insert syntax strings into a rule, instead of entering the syntax manually. Once inserted, you can customize the strings as necessary. Choices are available for:

  • conditional statements
  • keywords
  • operators

To insert a string:

  1. Position the cursor at the destination in the rule.
  2. Select the string from one of the drop-down lists. The string is inserted using the appropriate color coding for readability.
  3. Edit the inserted string as necessary.

Insert a code snippet

Use the choices in the Snippets area of the Edit Rule dialog box to insert code snippets in a rule. You can then modify the inserted snippet as necessary.

  1. Position the cursor in the rule text area at the point of insertion.
  2. Click the System or Custom tab in the Snippets area to display the available categories for that tab.
  3. Double-click a snippet to insert it at the cursor location. Each component of the snippet, such as conditional text, functions, and placeholders for variables and parameters, is color-coded for readability.
  4. Edit the inserted snippet.

Work with collapsible code regions

Create collapsible code regions and comments

Define collapsible code regions and comments to reduce clutter in the rule text area.

Code region

  • Insert a single quote, followed by a left square bracket, to identify the beginning of a collapsible code region. Use a single quote, followed by a right square bracket, to indicate the end of the collapsible region.
  • Click the node icon (-) to collapse the code.

Comment

  • Insert three single quotes at the beginning of a line to define it as a collapsible comment. If the comment spans multiple lines, insert three single quotes at the beginning of each line.
  • Click the node icon (-) to collapse the comment.

Manipulate outlining of collapsible code regions and comments

Use the following context menu choices in the rule text area to work with collapsible code regions and comments:

  • Right-click, then select OutliningToggle Outlining Expansion to toggle the expansion of the code region or comment at the cursor location.
  • Right-click, then select OutliningToggle All Outlining to toggle the expansion of all collapsible code regions and comments in the rule.
  • Right-click, then select OutliningStop Outlining to disable all outlining capabilities and expand any collapsed code regions or comments. The outlining tree is also removed from display. To enable outlining capabilities, right-click and select OutliningStart Automatic Outlining.

Prevent a rule from running automatically

  1. Open the rule in the Rule Editor.
  2. Select the Options tab.
  3. Select the Suppressed check box.
  4. Click OK.
    NoteYou can run a suppressed rule manually. You can also suppress a rule in the iLogic Browser.

Run a rule without displaying Inventor dialog boxes

  1. Open the rule in the Rule Editor.
  2. Select the Options tab.
  3. Select the Silent Operation check box.
  4. Click OK.

Run dependent rules immediately when referenced parameters change value

  1. Open the rule in the Rule Editor.
  2. Select the Options tab.
  3. Select the check box labeled Fire dependent rules immediately.
  4. Click OK.
    NoteBy running dependent rules immediately, you can include explicit model updates after you set the parameters. At the time of update, the parameters have changed and the dependent rules have run.

Prevent a rule from running when parameters change

  1. Open the rule in the Rule Editor.
  2. Select the Options tab.
  3. Select the check box labeled Don’t run automatically.
  4. Click OK.
    NoteIf this option is selected, you can only run the rule manually, or with event triggers, or with iLogicVB.RunRule.

Share code between rules

  1. Open the rule in the Rule Editor.
  2. Select the Options tab.
  3. Select the check box labeled Straight VB code.
  4. Click OK.

iLogic does not pre-process the code in a rule identified as Straight VB code; therefore, Inventor parameter names are not recognized in the rule. The rule should contain Classes or Modules that can be called from other rules. Use this option to share code between rules, or as a way to keep code modular. However, note that shared code is more difficult to write.

Choose alternative font style and size for Rule Editor

  1. Open the rule in the Rule Editor.
  2. Select the Options tab.
  3. Click Select Font.
  4. Choose a Font and Size. The Sample text box displays the results of your selections.
  5. Click OK.

Select syntax for Capture Current State

This option affects only assemblies, when Capture Current State is used on a parameter in a component within the assembly:

  1. Open the rule in the Rule Editor.
  2. Select the Options tab.
  3. Select the Use component names checkbox to include component names (for example, Parameter("PartA:1", "d0") = 5.6 in) as part of the syntax. This choice is recommended for portability.

    Alternatively, clear the checkbox to exclude the component names (for example, PartA.ipt.d0 = 5.6 in).

  4. Click OK.
    NoteYou can insert a parameter into a rule by clicking its name while creating rules at the assembly level. If you later change the component name to something other than its original filename, using parameter syntax makes it easier to find the component.

Run rules

To run a rule manually, right-click on the rule in the iLogic Browser, and select Run Rule from the context menu.

To ensure that the parameters in the rule are synchronized with the model, select Regenerate Rule from the context menu before running the rule.

To run another rule explicitly within a rule, use the iLogicVb.RunRule function.

Reorder the tree in the iLogic Browser

Drag and drop any rule in the iLogic Browser to change its order in the tree. Any rule at or below the rule you drop moves down in the tree.

Regenerate a rule

To synchronize the parameters in a specific rule with your model.

  1. Select the rule in the iLogic Browser.
  2. Right-click, and select Regenerate Rule from the context menu.

This command reconnects the rule to Inventor parameters, recompiles the rule, and then runs it.

Regenerate all rules in the current document

Use this command to synchronize the parameters in all rules with your model.

  1. Select the document in the iLogic Browser.
  2. Right-click, and select Regenerate All Rules from the context menu.

Alternatively, you can use the Regenerate All Rules command on the ribbon. Select Manage tabiLogic panel Regenerate All Rules.

Delete a rule

  1. On the ribbon, click Manage tabiLogic panel iLogic Browser.
  2. Right-click on the rule, and select Delete from the context menu.
  3. Click OK when prompted to confirm your selection.

Delete all rules in a document

Use this command when you have finished configuring the model and want to save or export a sample configuration. All rules are removed.

NoteIf you run this command in an assembly, all rules in the subassemblies and parts are also deleted.

Work with external rules

Create an external rule

The iLogic Browser includes a tab for external rules. From this tab, you can load an external rule or create a new one.

To make an existing rule external:

  1. Open the rule.
  2. Copy the code.
  3. Create a new external rule, and paste the code into the new rule.

Save external rules as .iLogicVb files (this extension is recommended), or as .vb or .txt files. Save external rules to a folder that can be found when running them from another rule. iLogic looks for external rule files in the following folders, in the order listed:

  • The folder in which the current Inventor document is located (allows models to be copied with associated rules)
  • The current Inventor Project Workspace folder
  • The list of folders set in iLogic Configuration (generally for work group or company rules)

The iLogic Browser provides a context menu for the top node (External Rules in Files) and for each rule in the tree.

Create an external rule icon

You can include an icon for an external rule that displays in the iLogic Browser. Create a .bmp file (size 16 X 16 is recommended) with the same name as the rule file, in the same folder.

For example, if your external rule is named Custom Checks Rule.iLogicVb, name the icon file as Custom Checks Rule.bmp.

After you create the bitmap image, restart Autodesk Inventor to display the icon. You cannot edit the icon while Autodesk Inventor is running.

Edit an external rule

To edit an external rule, open the Edit Rule dialog box, and double-click the rule in the tree to edit it.

You can also use an external program such as Notepad to edit a rule. After you save it, use Reload From File from the context menu in the tree to bring the changes into Inventor.

External rules and parameters

External rules do not run automatically in response to particular parameter changes. Unlike internal rules, parameter names are not automatically available as rule variables.

For example, the following rule statement does not work:

d1 = d0 * 0.5

Instead, use the following:

Parameter("d1") = Parameter("d0") * 0.5

This statement works on any part or assembly with parameters named d0 and d1. It can be used to operate on related parts that share something in common.

Use wizards to create special rules

ImportantUse the iLogic Form Designer to create custom user interface forms. The user interface can contain controls to trigger rules, change parameter values, and set iProperties. iLogic Form Designer does not require any programming. Use Visual Basic to design and program a form when the user interface needed is beyond the capabilities of iLogic Form Designer.

Control a dialog box based on model parameters

  1. Click Create Rule for a Dialog on the Wizards tab of the Edit Rule dialog box.

    The Open DLL File dialog box displays the contents of the iLogicAdd folder, which contains previously created DLL files.

    NoteYou may need to create the iLogicAdd folder as C:\Program Files\Autodesk\Inventor {version}\Bin\iLogicAdd.
  2. Select a DLL to populate the Rule for External DLL dialog box with the appropriate class and variable names.
  3. Click OK to generate the code.

Capture the current display view

  1. Click Capture Current View on the Wizards tab of the Edit Rule dialog box.
  2. Select a Size Option from the Capture View dialog box.
    • Save and Restore current view extents - Restores the view to the orientation and zoom settings from when the rule captured the view.
    • Don’t change view size on restore - Moves the model to the center of the display and sets the orientation, but does not change the zoom.
    • Fit to model extents on restore - Moves the model to the middle of the display and fills the display (same as Zoom All).
  3. Click OK to generate the code.

Generate a message box

Use this wizard to create a rule that generates a message box.

  1. Click Message Box on the Wizards tab of the Edit Rule dialog box.
  2. Enter the Title to appear at the top of the message box.
  3. Select the combination of buttons to appear on the message box.
  4. Indicate the default button by selecting the number that corresponds to its relative placement in the order, based on the Buttons selection.

    For example, if you have chosen YesNoCancel as your button scheme, and your default button is No, select 2.

  5. Select a status Icon to be displayed in the message box.
  6. Enter the text to be displayed in the message box, surrounded by quotes.
  7. Click Preview to display the message box using your selections.
  8. Click OK to generate the code.

Display diagnostic information when parameter values fall outside specified range

  1. Click Parameter Limits on the Wizards tab of the Edit Rule dialog box.
  2. Enter the Name of the parameter.
  3. Specify the maximum and minimum values.
  4. Enter the message Title and message text to display for violations of the maximum and minimum values.
  5. Click Apply to generate the code, or click Default Message to reset the messages to their default text.

Use a rule to display a dialog box

You can use a rule to display a dialog box for user input. The dialog box can be contained in the rule; however, it is easier and more flexible to include it in an external DLL (class library).

Use Visual Studio version 2005 or 2008. Visual Basic Express is available as a free download from Microsoft.

Get started with Visual Basic 2008

  1. Download and install Visual Basic 2008 Express from the Microsoft® web site if it is not already installed on your computer. The download is free.
  2. Open Visual Basic 2008 Express, and create a project of type Class Library.
  3. Name the project ClassLibrary1 (the default name), and click OK. Write the name on a piece of paper exactly as you have typed it. This name is important later in these instructions.

    A new window displays, with the Solution Explorer in the top right corner.

  4. In the Solution Explorer, right-click the project name and select Add, then select New Item from the submenu. The Add New Item dialog box displays.
  5. Select the Dialog template, and click Add.

    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.

  6. Click and drag TextBox from the Common Controls group of the ToolBox panel to the dialog box, and place it in the gray area of the dialog box. You can resize the dialog box as required.
  7. Add a Label for the TextBox to show the parameter name.
  8. Being careful to avoid the Label and the TextBox, double-click the dialog box background to display the code editor. The following code displays.
  9. Move your cursor immediately below the line-
    Public Class Dialog1
  10. Add this line -
    Public d0 As Double
  11. Position your cursor at the top of subroutine OK_Button_Click, in front of the Me.DialogResult... statement, and press Enter to add a new line.
  12. On the new line, add -
    d0 = TextBox1.Text

    Your code looks like -

  13. Save your work using File 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.

  14. Click the tab with the project title on it, and click the Compile tab again. The output path is -

    Program Files\Autodesk\Inventor {version}\Bin\iLogicAdd\

  15. To build the project, click the Build tab in the menu at the top. If the build proceeds without problems, the message Build succeeded displays in the status bar in the bottom left corner of the screen.
  16. Save your work again using Save All, and open Inventor.
  17. Use Add Rule to create a rule named Form Rule that consists of the following -.
    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
    NoteYou can also use Create Rule for a Dialog on the Wizards tab in the Edit Rule dialog box to create this code.

    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.

Create a dialog box

To create a dialog box that enables you to display and modify some parameter values:

  1. Open Visual Studio.
  2. Create a project of type Class Library.
  3. In the Solution Explorer, right-click on the project name, and select Add 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.

  4. Click View Toolbox to preview the available controls.
  5. Add the TextBox control if you want the ability to display the value of an Inventor parameter and edit it. Add a Label for each Textbox to display the parameter name.
  6. Double-click the dialog box background.

    The code editor displays in a new subroutine named Dialog1_Load.

  7. In this subroutine, add this line before the end of the subroutine -
    TextBox1.Text = d0
  8. Move your cursor below the line -
    Public Class Dialog1
  9. Add this line -
    Public d0 As Double
  10. At the top of the subroutine named OK_Button_Click, add this line -
    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
  11. Build the project and save it using File Save All.

A DLL is created when the project is built. You can either:

  • Copy the DLL to the iLogicAdd directory, which is located under the Autodesk Inventor program bin directory (usually in C:\Program Files\Autodesk\Inventor {version}\Bin\iLogicAdd).
  • Change the project settings to send the DLL to that directory automatically. Use the iLogic Configuration command to change the directory where iLogic looks for the DLL. See “Expanding iLogic capabilities” for more information on using DLL files in rules.

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.

Work with forms

Create a form

Create and connect a custom user interface to the parameters, properties, and rules of an Inventor part, assembly or drawing document.

Create a global form

A global form is stored for use across multiple documents.

Use a form

Use the forms to control and modify the model. The form can be:

  • Modal - while the form displays you can only interact with the form.
  • Non-modal - while the form displays you can interact with the model, other controls and tools.

Edit a form

Edit an existing form to add, remove, or modify controls.

Copy and paste a form

Copy and paste an existing form within the same document, to another document, or to the Global Forms tab.

Delete a form

Delete a form when it is no longer needed. Right-click in an empty area of the iLogic Browser tab to display the Forms and Rules Editor where you can delete a form.

Use images

Add static images to the form or set up images to change based on a parameter value.

Resize controls

Importantif you edit the form later, controls revert to default sizes.

Add or edit controls on the iLogic Browser

  • Add controls to trigger rules directly on the Forms or Global forms tabs.
  • Organize controls into groups, tabbed groups, and rows.
  • Modify the appearance of the controls.
  • Add an image or tooltip to a control.

References

iLogic Browser

Access:

Ribbon: Manage tab iLogic panel iLogic Browser.

Rules

Rule context menu

Right-click on a rule or parameter in the iLogic Browser to display the context menu for that item.

For a rule, the context menu commands include:

Run Rule

Runs the rule. Use this command to test the rule, or to ensure that the model is up-to-date. You can also use this command to run rules that do not run automatically.

Edit Rule

Opens the Edit Rule dialog box for the selected rule.

You can also double-click the rule in the browser to edit it.

Regenerate Rule

Regenerates the selected rule. This command reconnects the rule to the Inventor parameters that it references, then recompiles and runs the rule.

Suppress Rule (or Unsuppress Rule)

A suppressed rule does not run automatically. You can run a suppressed rule manually.

Delete

Deletes the rule. You can also delete a rule using the Delete key. To delete all rules, use the Delete All Rules command on the ribbon.

Top-level context menu

For the document at the root of the iLogic Browser tree, the context menu commands include:

Add Rule

This command performs the same action as the Add Rule command on the ribbon.

Run All Rules

Runs all rules in the document. If the document is an assembly, this command also runs all rules in all subassemblies and parts. You can use this command to verify that the model is up-to-date. Execution stops when the first error is encountered. If you receive an error, edit the offending rule and repeat this command.

You can also use this command if you changed something in the model that is driven by a rule. Rules only run in response to parameter changes. Anything else that a rule can set, such as feature or component suppression, iPart configuration, manual changes, or iProperties, can be changed independently.

Rules are run in the order in which they appear in the browser, unless specified otherwise by inclusion of the iLogicVb.RunRule("ruleName") function.

Run All Rules ensures that the model is in the state specified by the rules.

Regenerate All Rules

Reconnects the rules to Inventor parameters, recompiles the rules, and then runs them. Like Run All Rules, this command processes rules in subassemblies and parts.

Rules tab

Lists the rules that are defined within the current Inventor document.

External Rules tab

Lists the rules that are defined in external files.

Forms

Top-level context menu

Right-click in an empty area to display the context menu for the tab.

Add Form

Adds a blank form and opens the Form Editor dialog box for the new form.

Edit

Opens the Forms and Rules Editor dialog box to add or edit the controls on the tab.

Paste Form

Pastes a previously copied form on to the tab.

Forms context menu

Right-click on a form to display the context menu for the form.

Edit

Opens the Form Editor dialog box for the selected form.

Copy Form

Copies the selected form. Right-click in an empty area of the tab to paste the form.

Rules button context menu

Right-click on a rules button to display the context menu for the rule.

Edit

Opens the Edit Rule dialog box for the selected rule.

Forms tab

Create and connect a custom user interface to the parameters, properties, and rules of an Inventor part, assembly or drawing document.

Global Forms tab

Create and connect a custom user interface to the parameters, properties, and rules of an Inventor part, assembly or drawing document stored for use across multiple documents.

iLogic Browser behavior

  • Once the iLogic Browser is shown, it remains displayed until you close it.
  • The state of the iLogic Browser is remembered across sessions. If the iLogic Browser is displayed when Inventor is shut down, it is shown again (empty) when Inventor is restarted.
  • If a document is activated that does not support rules or forms (such as a presentation), or if Autodesk Inventor is in the “no document” state, then the browser window is empty except for the "iLogic" title. This convention is like the model browser in the no-document state.
  • If a document is activated that supports rules and forms, the tabs are shown whether or not rules or form definitions exist in the active document.

Add Rule

Use the Edit Rule dialog box to define a new rule or change an existing rule.

Access:

Ribbon: Manage tab iLogic panel Add Rule

Snippets

Lists reusable pieces of code. Double-click a snippet to insert it in the rule.

System tab

Lists iLogic snippets provided with the installation.

Toggles the display to include only those snippets identified as favorites.

Displays a dialog box used to identify favorite snippets.

Custom tab

Lists snippets you create or copy from the System tab.

Save the snippets file

Save the snippets file to a different name.

Replace all snippets in the list with snippets from a file.

Merge snippets in the list with snippets from a file.

Display file information for snippets in the list.

Model

Presents a model view of a part or drawing, or a component view of an assembly.

Parameters

Lists the parameters based on the Parameter Type selected in the tree.

Names

Cumulatively lists items from the tree as they are selected.

Click Clear List to remove the items from the list and start over.

File Tree

Presents a file view of an assembly, instead of the component view shown on the Parameters tab. Use this view to find objects quickly under part and assembly names.

Files

Lists the names of the part files in an assembly. Use this view to copy file names for use in a rule.

Options

Determines the behavior of the rule, along with certain characteristics of the rule appearance.
 

Behavior of this Rule

Suppressed - Prevents a rule from running automatically.

Silent Operation - Runs a rule without displaying the Inventor dialog boxes by automatically selecting the default responses.

Fire dependent rules immediately - For other rules that run because they refer to a parameter that this rule changes, run them as soon as the parameter value changes. Avoid waiting until this rule finishes.

Don’t run automatically - Prevents the rule from running in response to parameter changes.

Straight VB code - Identifies this rule as code that can be shared between rules.

 

Rule Editor

Select Font - Selects the font for the rule text.
 

Capture Syntax

Use component names - Convert parameters into Parameter syntax automatically, using the component name.

Search and Replace

Finds a string in the current rule, and optionally replaces the string with another string.

Find what

Enter a string to search for.

Replace with

Enter a string to replace the original string with.

 

Match Case

Select to distinguish between lower case and upper case characters.
 

Match whole word only

Select to find only the exact character string. Do not match if it is found within a longer word.
 

Find

Find an occurrence of the string.
 

Find Next

Find the next occurrence of the string.
 

Find Previous

Return to the previous occurrence of the string.
 

Replace

Substitute the found string with the specified replacement string.
 

Replace All in This Rule

Substitute all occurrences of the found string in the current rule with the specified replacement string.
 

Replace All in All Rules

Substitute all occurrences of the found string in all rules with the specified replacement string.

Wizards

Lets you choose from several task-based wizards.

Create Rule for a Dialog

Creates a rule for a custom dialog box based on model parameters.

Message Box

Creates a rule that generates a message box.
 

Capture Current View

Creates a rule that captures the current screen view.
 

Parameter Limits

Creates a rule that displays diagnostic messages when parameter values are outside of a specified range.

Editing Toolbar

Includes tools for working with iLogic rules..

Print

Prints the text of the current rule.

Page Setup

Determines the page setup to print rule text.
 

Cut

Removes selected rule text and places a copy on the clipboard.
 

Copy

Places a copy of the selected rule text on the clipboard.
 

Paste

Pastes a copy of the rule text from the clipboard at the cursor location.
  Redo Reapplies the effects of the last editing function.
 

Undo

Removes the effects of the last editing function.
 

Increase Indent

Adds space to the left of the current line.
 

Decrease Indent

Removes space to the left of the current line.
 

Comment out the selected lines

Changes the selected line of rule text to a comment.
 

Uncomment the selected lines

Removes the comment tag from a commented line.
 

If...Then...End If

Displays a drop-down list used to insert a selected conditional statement.
 

Keywords

Displays a drop-down list used to insert a selected keyword.
 

Operators

Displays a drop-down list used to insert a selected operator.
 

Help

Displays the Help for this dialog box.
 

OK

 
 

Cancel

 

Rule for External DLL

Use this dialog box to create a rule for a custom dialog box based on the parameters in the model.

Access:

Ribbon: Manage tab iLogic panel Add Rule, then select Create Rule For a Dialog on the Wizards tab of the Edit Rule dialog box. Choose a DLL file.
Browse for DLL Displays the Open DLL dialog box, which allows you to select a DLL to populate the dialog box with the class and variable names.
DLL Name Displays the name of the selected DLL file.
Dialog or Class Names Displays the dialog box or class names for a selected DLL file. You can select or deselect the dialog box or class names. Deselect to omit from the rule.
Variable Names Displays the variable names for a selected DLL file. You can select or deselect the variable names. Deselect to omit from the rule.
OK Creates the rule.
Cancel Cancels the operation.

Capture View

Use this dialog box to create a rule that captures the current display view based on a selected size option.

Access:

Ribbon: Manage tab iLogic panel Add Rule, then select Capture Current View on the Wizards tab of the Edit Rule dialog box.
Save and Restore current view extents Restores the view to the orientation and zoom settings from when the rule captured the view.
Don’t change view size on restore Moves the model to the center of the display and sets the orientation, but does not change the zoom.
Fit to model extents on restore Moves the model to the middle of the display and fills the display (same as Zoom All).
OK Adds text to the rule.
Cancel Cancels the operation.

Message Box Wizard

Use this dialog box to create a rule that generates a message box.

Access:

Ribbon: Manage tab iLogic panel Add Rule, then select Message Box on the Wizards tab of the Edit Rule dialog box.
Title The title that appears at the top of the message box.
Buttons The combination of buttons that appear on the message box.
Default Button The number of the default button, based on its relative placement in the Buttons selection.
Icon The status icon to display in the message box.
Prompt Text The text to display in the message box, surrounded by quotes.
Preview Displays a preview of the message box, based on your current selections.
OK Adds text to the rule.
Cancel Cancels the operation.

iLogic Limits Wizard

Use this dialog box to create a rule that displays diagnostic messages when parameter values are outside of a specified range.

Access:

Ribbon: Manage tab iLogic panel Add Rule, then select Parameter Limits on the Wizards tab of the Edit Rule dialog box.
Name The name of the parameter.
Max. Value The maximum value allowed before triggering the message.
Min. Value The minimum value allowed before triggering the message.
Max. Violation The text to display when the parameter value exceeds the maximum value allowed.
Title (for Max. Violation) The title to display on the message box.
Min. Violation The text to display when the parameter value falls below the minimum value allowed.
Title (for Min. Violation) The title to display on the message box.
Default Resets the messages to their default text.
OK Creates the rule.
Cancel Cancels the operation.

Advanced rule creation techniques

You can write iLogic rules using only Autodesk Inventor parameter assignment statements, predefined iLogic functions, and simple VB.NET code. However, you are not limited to these techniques. You can use more advanced features of VB.NET in a rule. Visual Basic 2005 or 2008 can be used to create external DLL files that can be called from rules. You can also call DLL files written in C# or C++.

Visual Basic 2008 (.NET Framework 3.5) syntax is supported within the rule code.

The following statements can be used at the top of the rule, before the main rule code:

Option Explicit On

Option Strict On

Option Infer Off

AddReference "filename.dll"

Imports ...

AddVbRule "Other Rule"

AddVbFile "filename.vb"

AddResources "filename.resources"

Option and Imports are standard VB.NET statements.

Option Explicit Off is the default. It allows you to use local variables without declaring them.

Option Strict Off is the default. Option Strict On also works for most rules.

Option Infer On is the default.

The main rule code is an "implicit" subroutine. To add more subroutines, functions, properties, or Classes, declare a Sub Main() as follows:

Sub Main()
' your main rule code here
End Sub

Sub Main() can be used in any rule, regardless of whether the rule has additional code. For more detailed information about explicitly declaring your rule class, see “How is a rule processed?”

AddReference

Uses special iLogic syntax. Adding a DLL name to an AddReference statement is like using the AddReference command and browsing for a DLL in Visual Studio or Visual Basic Express. Only .NET assemblies are supported. The DLL can be a standard Microsoft assembly, as in the Microsoft.NET\Framework directory.

For example, consider the following statement:

AddReference "System.Drawing.dll"

In this statement, the .dll extension is optional.

You can also specify a user-created or third-party class library as a reference. User-created or third-party DLLs must all be in one directory. By default, these DLLs are located under the Autodesk Inventor installation directory, in an iLogicAdd subdirectory, such as:

C:\Program Files\Autodesk\Inventor [Version]\Bin\iLogicAdd

You can change this location using the iLogic Configuration command. You can also add references to DLLs in the main Autodesk Inventor Bin directory (for example, C:\Program Files\Autodesk\Inventor [Version]\Bin).

The AddReference statement does not support a full path specification. You can only specify a filename. Add references to assemblies in the Global Assembly Cache (GAC), using a qualified name such as:

AddReference "VsWebSite.Interop, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”

You can also create or access registered COM objects in a rule using CreateObject or GetActiveObject. It is not necessary to use AddReference for a COM DLL.

AddVbRule

Includes the code from the specified rule as VB code, compiled with the main rule. The specified rule cannot be a standard rule. It must have the Straight VB code option enabled in the Options panel of the Edit Rule dialog box. iLogic does not pre-process the code in such a rule. The rule contains Classes or Modules that can be called from other rules. Use this statement to share code between rules, or to keep code modular.

Example

AddVbRule "Other Rule"

AddVbFile

Operates similarly to AddVbRule, except that the VB code is stored in an external file instead of a rule. As with AddVbRule, the code must have the Straight VB code option enabled. This statement is useful for sharing common code between models. The file specification must be a relative path name. iLogic searches the directory of the current Autodesk Inventor document, and in other directories, using the same search order employed for external rules.

Example

AddVbFile "fileName.vb"

AddResources

Adds resources such as strings or bitmaps. The resources must be compiled with Visual Studio.

Example

AddResources "fileName.resources"

Imports

Duplicate Imports statements are not allowed. The following default Imports statements are implicitly used in all rules:

  • Imports System
  • Imports System.Math
  • Imports System.Collections
  • Imports Microsoft.VisualBasic
  • Imports Autodesk.iLogic.Interfaces
  • Imports Autodesk.iLogic.Runtime

If you use MessageBox in a rule, then iLogic automatically adds the following statement:

Imports System.Windows.Forms

If you use ThisApplication or other Autodesk Inventor objects, then iLogic automatically adds the following:

Imports Inventor

Rule arguments

iLogic provides advanced functionality that allows you to pass context information as rule arguments into the rules you run. This information can be used to modify the behavior of a rule without having to create a duplicate rule.

You pass rule arguments using functions available in the IiLogicAutomation interface (for external clients), and in iLogicVB (for other rule code and internal clients). These arguments are made available within a rule via the RuleArguments property.

For IiLogicAutomation, the functions available include:

Function RunRuleWithArguments(ByVal doc As Inventor.Document, ByVal ruleName As String, ByVal ruleArguments As Inventor.NameValueMap) As Integer

Function RunExternalRuleWithArguments(ByVal doc As Inventor.Document, ByVal ruleName As String, ByVal ruleArguments As Inventor.NameValueMap) As Integer

Function RunRuleDirectWithArguments(ByVal rule As iLogicRule, ByVal ruleArguments As Inventor.NameValueMap) As Integer

For iLogicVB, the functions available include:

Function RunRule(ByVal ruleName As String, ByVal ruleArguments As Inventor.NameValueMap) As Integer

Function RunRule(ByVal compoOrDocName As Object, ByVal ruleName As String, ByVal ruleArguments As Inventor.NameValueMap) As Integer

Function RunExternalRule(ByVal ruleName As String, ByVal ruleArguments As Inventor.NameValueMap) As Integer

Create rule arguments

To create rule arguments, use the Inventor API to create a new NameValueMap object. It is then passed to one of the functions when running the rule.

Access an argument passed to the rule

x = RuleArguments(“myArg”)

Determine if an argument has been passed to the rule

If RuleArguments.Exists(“myArg”) Then...

Pass the set of arguments to another rule using RunRule

iLogicVB.RunRule(“someOtherRule”, RuleArguments.Arguments)

Additional statements

If you use Sub Main(), the rule follows standard VB.NET format for a class, except that the Class... and End Class statements are not visible, and the statements before Sub Main() are outside the class. Therefore, place all assignment statements inside a Sub, Function, or Property. You can include declaration statements for class member variables such as Private temp As Double = 4.5 outside of a subroutine or function.

You can add Sub, Function, Property, and Class definitions after Sub Main()... End Sub. Any Class you add is nested in the main rule Class for that rule and cannot be used from another rule. To add an independent Class or Module, explicitly declare the rule Class using the following:

Class ThisRule ' ...
Sub Main
End Sub
' ...
End Class

You can then add another Class or Module (or more than one) outside of this code. Class ThisRule becomes your main rule Class, and iLogic calls Sub Main (within it) to run your rule.

To include a Moduleor Class that is visible to multiple rules, put it in an external assembly (DLL). You can put more than one in the same DLL. You can also use AddVbRule to put them in a rule identified as "Straight VB code" within the Inventor document (). Or, use AddVbFile to put them in an external VB file.

When you develop advanced VB.NET code, use Visual Studio or Visual Basic Express rather than coding directly in a rule. You can then cut and paste relatively small snippets of code from Visual Studio into a rule. You can even paste in an entire dialog box Class (although resources are not easily supported). For larger units of code, or where required, create an assembly and use it as an external DLL from a rule.

You can store objects that are instances of a user-defined Class using the iLogic rule Shared Variable functions. To store these objects, serialize the Class, or it must be derived from MarshalByRefObject.

External DLLs

You can write your own external DLLs in .NET and call them from a rule. To debug a DLL, set the build output path under Project Properties Compile to iLogicAdd (under the Inventor Bin directory). Then, choose Inventor.exe for Start external program in your project properties in Visual Studio. This method allows you all the benefits of the debugging environment, including Edit and Continue.

External DLLs are useful when using a rule to display a dialog box for user input.

Inventor API

To access the Inventor API from a rule, use the ThisApplication property to access the Inventor application. Use ThisDoc.Document to access the document that contains the current rule.. You can create and modify features. Use Parameter.Param to get direct access to an Inventor.Parameter.

To use the Inventor API from your own DLL, add a reference to Autodesk.Inventor.Interop.dll in your Visual Basic project. It displays in the Add Reference dialog box on the .NET tab. For Inventor 2011, the version is 15.0.0.0.

Use iLogic interfaces in external DLLs

All iLogic functions are grouped under interface objects such as Parameter, iProperties, iPart, and so on. You can pass iLogic interface objects as arguments to functions in external DLLs. To use these objects in your project, add a reference to Autodesk.iLogic.Interfaces.dll. Select the Browse tab in the Add Reference dialog box, and browse to the iLogicBin directory, under the Inventor bin directory (usually in C:\Program Files\Autodesk\Inventor [Version]\Bin\iLogicBin).

Documentation for the iLogic interfaces is provided in Autodesk.iLogic.Interfaces.xml. You can use the Object Browser in Visual Studio to read the interface descriptions. These descriptions include the names of the objects which implement the interfaces in rules. For example, the Feature object in a rule implements the ICadFeature interface.

Parameters in rules

By default, numeric parameters in rules are not declared as Double, but instead as a custom iLogic type called DoubleForEquals.

Form Editor dialog box

Use this dialog to create or edit a custom user interface form.

Access:

Ribbon: Manage tab iLogic panel drop-down arrowAdd Form

Filter

Filter the list on the Parameters, Rules, and iProperties tabs for:

  • All
  • Key
  • Renamed

Tabs

Drag and drop items from the tabs to the Form design tree to add controls on the user interface design. Only existing parameters and rules display on the tabs.

Form design tree

Design the user interface in the form design tree area.

  • Drag and drop parameters, rules, iProperties, and Toolbox items on to the form design tree to design and organize the user interface.
  • Drag and drop items on the tree to organize the controls.
  • Click in a label to edit the text.
  • Highlight an item to define the properties in the properties area.

Toolbox

Drag and drop an item to the form design tree.

 

Group

Groups items together on the user interface. Groups are boxed and collapsible on the user interface.

 

Tab Group

Creates a tab on the user interface.

 

Row

Creates a row allowing you to organize controls horizontally. Controls are organized vertically by default.

 

Picture

Adds a picture to the user interface. Pictures are informational only. Select the picture item in the Form design tree and define the image file in the properties.

 

Picture Folder

Adds a folder for alternate pictures.

 

Empty Space

Adds a blank space on the user interface form.

 

Label

Adds a text label on the user interface form.

 

Splitter

Adds a resizable splitter bar on the user interface.

Properties

Define the properties for the highlighted item in the form design tree. Properties vary depending on the item selected.

Allow Control Resizing

If set True, enables the Resize Controls right-click option on the form. This option allows you to resize controls and groups.

Edit Control Type

Defines the control type to use to edit this parameter.

Enabling Parameter Name

Defines the name of an Inventor true/false parameter. Setting this parameter to True enables this control.

Font

Defines the font for this control.

Font for Contents

Defines the font for the controls that are within this form or group.

Image

Defines the image file to display in this control.

Label

Defines the text to display for this element in the form.

Maximum Width

Defines the maximum width for this control. The number indicates the number of characters in the specified font.

Minimum Width

Defines the minimum width for this control. The number indicates the number of characters in the specified font.

Modal

If set False, you can interact with the model and use other functions while the form is active.

Picture Parameter Name

Defines a picture control that changes based on the parameter value. Assign a parameter to the picture control instead of assigning an image. Use with a Picture Folder containing pictures with images assigned to the parameter values.

See Use images in a form.

Predefined Buttons

Defines the buttons to show at the bottom of the form. Select from a list of predefined sets.

ReadOnly

If set True, sets the parameter as not editable from the form.

Show Item Border

If set True, displays all borders around controls.

Show on Place Component

If set True, displays the form when placing this model as a component in an assembly. This setting affects Place Component and Place iLogic Component. If the template file has a form, this setting also affects Create In-Place Component.

Text Location for Contents

Defines the text location for the controla that are within this form or group.

Tooltip

Defines the tooltip text to display when the mouse hovers over the control.

Visual Style

Defines the visual style or skin for the form. Select from a list of options.

Forms and Rules Editor dialog box

Use this dialog to add or edit controls to launch forms and trigger rules from the iLogic Browser.

Access:

On the iLogic Browser, right-click in an empty area and select Edit.

Rules

Drag and drop a rule to the Form design tree to add a button on the iLogic Browser. Use the button to trigger the rule.

Form design tree

Design the iLogic Browser in the form design tree area.

  • Drag and drop rules and Toolbox items on to the form design tree to design and organize the iLogic Browser.
  • Click in a label to edit the text.
  • Highlight an item to define the properties in the properties area.

Toolbox

Drag and drop an item to the form design tree.

 

Form

Adds a blank user interface form. Customize the form using the Form Editor dialog box.

 

Group

Groups items together on the iLogic Browser. Groups are boxed and collapsible.

 

Tab Group

Creates a tabbed group within the iLogic Browser.

 

Row

Creates a row allowing you to organize controls horizontally. Controls are organized vertically by default.

 

Empty Space

Adds a blank space on the iLogic Browser tab.

 

Label

Adds a text label on the iLogic Browser tab.

 

Splitter

Adds a resizable splitter bar on the iLogic Browser tab.

Properties

Define the properties for the highlighted item in the form design tree. Properties vary depending on the item selected.

Enabling Parameter Name

Defines the name of an Inventor true/false parameter. Setting this parameter to True enables this control.

Font

Defines the font for this control.

Font for Contents

Defines the font for the controls that are within this form or group.

Image

Defines the image file to display in this control.

Label

Defines the text to display for this element in the form.

Maximum Width

Defines the maximum width for this control. The number indicates the number of characters in the specified font.

Minimum Width

Defines the minimum width for this control. The number indicates the number of characters in the specified font.

On Click Action

Defines what this button does when it is clicked. Select from a list of options.

Show Borders

If set True, displays all borders around controls.

Show Text

If set True, the label text displays on the button. Set to False if you want to show only a picture on the button.

Text Location for Contents

Defines the text location for the controla that are within this form or group.

Tooltip

Defines the tooltip text to display when the mouse hovers over the control.

Visual Style

Defines the visual style or skin for the form. Select from a list of options.