在此自學課程中,我們將使用 iLogic Automation 規則建置、執行和後處理線性靜態模擬。我們將模擬作用在不鏽鋼托架上的螺栓負載。
現在我們可以開始建立一個規則,包含定義模型的 iLogic 指令。我們可以建立多個規則,每個都有獨特的步驟,或者我們可以建立一個規則,其中包含建置模型所需的所有步驟。在此範例中,我們將建立一個規則。
您會看到已建立主要規則。此規則必須與您建立的所有其他規則平行。基於此自學課程的目的,請注意此規則必須永遠存在。主規則用於
依預設,在主規則中,「iLogic 外部規則」目錄和「iLogic 增益集 DLL」目錄會設定為 C 磁碟機,如下所示:
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"
如果 Inventor Nastran 2023 安裝在不同的磁碟機中,則必須相應地設定這兩個目錄。例如,如果安裝在資料夾 D:\ADSK_NS2023 中,必須在主規則中更新兩個目錄的路徑。編輯主規則並變更路徑,如下所示:
ExternalRuleDirectory(0) = "D:\ADSK_NS2023\Inventor Nastran 2023\In-CAD\System\iLogic"
oIlogic.FileOptions.AddinDirectory = " D:\ADSK_NS2023\Inventor Nastran 2023\In-CAD\System"
iLogic 規則是以 Visual Basic 語言建立。我們要加入的第一組指令將定義外部 iLogic 規則和 Inventor Nastran 增益集。
AddReference "NINIlogic" Sub Main() iLogicVb.RunExternalRule("IlogicExtRule_EnterInCADEnv") Dim AddinObj As New NINIlogic.InCadAddin Dim strCmdForLoad, strCmdForConstraint, strCmdForMeshModel, strCmdForMesh, strCmdForSolve, strCmdForDisplayContour As String