Tutorial B8: iLogic Gravity Load on an Aluminum Frame

In this tutorial, we’ll use the iLogic Automation rules to build, run, and post-process a linear static simulation. We’ll simulate a gravity load acting on a carbon steel frame.

Open the Model and Inventor Nastran

  1. With Inventor open, click File > Open.
  2. Navigate to the directory where the file iLogic_trailer_frame.ipt is saved and click Open (C:\Users\Public\Public Documents\Autodesk\Inventor Nastran 2023\Tutorial\en-us\Inventor 2023).
  3. Click Environments > Autodesk Inventor Nastran.

Add Rules

Now we can begin to create a rule containing the iLogic commands that define the model. We can create multiple rules, each with unique steps, or we can create a single rule containing all the steps required to build our model. In this case, we’ll create a single rule.

  1. Switch to the iLogic tab in the browser.

    Important notes

    You will see that the Main rule has already been created. This rule must exist in parallel to all other rules you create. For the purposes of this tutorial, just be aware that this rule must always be present. The main rule is used for

    • Setting iLogic External Rules directory to Inventor Nastran's iLogic external rules folder.
    • Setting iLogic Addin DLLs directory (object of iLogic) to Inventor Nastran's System folder.

    By default, in the Main rule, the iLogic External Rules directory and iLogic Addin DLLs directory are set to the C drive as follows:

    ExternalRuleDirectory(0) = "C:\Program Files\Autodesk\Inventor Nastran 2023\In-CAD\System\iLogic"

    oIlogic.FileOptions.AddinDirectory = "C:\Program Files\Autodesk\Inventor Nastran 2023\In-CAD\System"

    If Inventor Nastran 2023 is installed on a different drive, both of the directories need to be set accordingly. For example, if installed in a folder D:\ADSK_NS2023, the paths for both directories need to be updated in the Main rule. Edit the Main rule and change the paths as follows:

    ExternalRuleDirectory(0) = "D:\ADSK_NS2023\Inventor Nastran 2023\In-CAD\System\iLogic"

    oIlogic.FileOptions.AddinDirectory = " D:\ADSK_NS2023\Inventor Nastran 2023\In-CAD\System"

  2. On the Rules tab, right click in the white space and choose Add Rule.
  3. Name the rule Tutorial 2 and click OK. This will open the new rule in the Edit Rule dialog which we’ll use in the steps that follow to build our model.

    The iLogic rules are created in Visual Basic language. The first set of commands we’ll add will define the external iLogic rules and Inventor Nastran add-ins.

  4. Copy the following text:
    AddReference "NINIlogic"
    
    Sub Main()
    	   iLogicVb.RunExternalRule("IlogicExtRule_EnterInCADEnv")
    
    	   Dim AddinObj As New NINIlogic.InCadAddin
    	
    	   Dim strCmdForNewMaterial, strCmdFornewIdealization As String
  5. Paste the text into the text field of the Edit Rule dialog.
  6. Press the Enter or Return key twice to jump down to a new line.