PWI Software Documentation Help

iLogic Class Libraries

Class libraries are compiled DLL files that provide functionality that can be used in other programs. We are primarily using class libraries to extend the functionality of iLogic rules. These class libraries allow us to have a common place to store "shared" functionality that can be updated in one place.

Guides for Developing and Using Class Libraries

Using a Class Library in an iLogic Rule

To utilize a class library in an iLogic rule, you must add a reference to it in the header.

  1. In the iLogic editor, open the header by selecting "Header..." from the toolbar.

    editor
  2. In the header, add a reference to the DLL file of the Class Library.

    AddReference "C:\CAD_Resources\Inventor Class Libraries\iLogicFunctions.dll"
  3. The public functions of the class library are now available for use.

Adding Functionality to PWI's iLogicFunctions Class Library

1. Developer Setup

  1. Using GitHub, clone the iLogicFunctions repository to your local machine.

  2. Make any code changes in Jetbrains Rider or Visual Studio and debug them.

2. Debugging

  1. In Jetbrains Rider, set the build configuration to "Debug" from the ribbon.

    rider-debug-config.png
  2. Set the Run Configuration to Inventor.

    inventor-run-config
  3. Verify that no existing instances of Inventor are running, and select "Debug".

    debug-inventor.png
  4. (optional) After Inventor is loaded use the Breakpoints settings (CTRL+ALT+B) to turn on "Exception Breakpoints".

3. Publishing Changes

  1. Make sure you are on the master branch of the Git repository.

  2. Set the build configuration to "Release".

    rider-release-config.png
  3. Set the Run Configuration to Publish to Server.

    rider-publish-config.png
  4. Verify that no existing instances of Inventor are running, and select "Run".

    run-publish-to-server.png
    09 April 2024