# How do you create your own MODL file

**URL:** <https://forum.inductiveautomation.com/t/how-do-you-create-your-own-modl-file/51562>\
**Category:** Module Development\
**Tags:** ignition80\
**Created:** [October 3, 2021, 6:30am UTC](https://forum.inductiveautomation.com/t/how-do-you-create-your-own-modl-file/51562 "2021-10-03T06:30:16Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![kingbetty511](https://avatars.discourse-cdn.com/v4/letter/k/f6c823/32.png) [@kingbetty511](https://forum.inductiveautomation.com/u/kingbetty511)\
**Post date:** [October 3, 2021, 6:30am UTC](https://forum.inductiveautomation.com/t/how-do-you-create-your-own-modl-file/51562/1 "2021-10-03T06:30:16Z")

</div>

What are the steps to create a new module?

---

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [October 3, 2021, 7:44am UTC](https://forum.inductiveautomation.com/t/how-do-you-create-your-own-modl-file/51562/2 "2021-10-03T07:44:02Z")

</div>

The shortest answer is reading the whole SDK guide, compile the github templates as reference and a lot of testing.

---

<div class="post-metadata">

**Author:** ![bmusson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmusson/32/87530_2.png) [@bmusson](https://forum.inductiveautomation.com/u/bmusson)\
**Post date:** [October 3, 2021, 6:15pm UTC](https://forum.inductiveautomation.com/t/how-do-you-create-your-own-modl-file/51562/3 "2021-10-03T18:15:56Z")

</div>

Some parts of the SDK guide are quite outdated, the module tools GitHub page is where I would recommend starting from.

1. Use the generator to create a skeleton project.
2. Use the gradle plugin to build/sign the module.
3. Once you have that working start building off of the skeleton project.

> **[GitHub - inductiveautomation/ignition-module-tools: Tools that help in the...](https://github.com/inductiveautomation/ignition-module-tools)**
>
> Tools that help in the creation and development of Modules for Inductive Automation's Ignition. - GitHub - inductiveautomation/ignition-module-tools: Tools that help in the creation and develop...

---

<div class="post-metadata">

**Author:** ![kingbetty511](https://avatars.discourse-cdn.com/v4/letter/k/f6c823/32.png) [@kingbetty511](https://forum.inductiveautomation.com/u/kingbetty511)\
**Post date:** [October 4, 2021, 1:31am UTC](https://forum.inductiveautomation.com/t/how-do-you-create-your-own-modl-file/51562/4 "2021-10-04T01:31:08Z")

</div>

Thank you so much

---

<div class="post-metadata">

**Author:** ![kingbetty511](https://avatars.discourse-cdn.com/v4/letter/k/f6c823/32.png) [@kingbetty511](https://forum.inductiveautomation.com/u/kingbetty511)\
**Post date:** [October 4, 2021, 1:32am UTC](https://forum.inductiveautomation.com/t/how-do-you-create-your-own-modl-file/51562/5 "2021-10-04T01:32:08Z")

</div>

Thanks

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [October 4, 2021, 3:29pm UTC](https://forum.inductiveautomation.com/t/how-do-you-create-your-own-modl-file/51562/6 "2021-10-04T15:29:03Z")

</div>

Note that _technically_ all you need to create is a module is at least one .jar file that implements one of our expected hooks and a `module.xml` file that describes it. How you generate those files is entirely up to you; we have Gradle and Maven plugins to make it easier, but they’re, strictly speaking, not required. @pturmel, at least at one point, used `ant` and eschewed our tooling entirely.

I say this to clarify that there’s nothing ‘magic’ about our tooling; anything that builds Java should be able to build an Ignition module without too much trouble.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 5, 2021, 11:32am UTC](https://forum.inductiveautomation.com/t/how-do-you-create-your-own-modl-file/51562/7 "2021-10-05T11:32:55Z")

</div>

> [@paul-griffith](#):
>
> @pturmel, at least at one point, used `ant` and eschewed our tooling entirely.

Still do. Though I do use your module-signer.

Will continue to use ant until 7.9 is EOL.

---

<div class="post-metadata">

**Author:** ![nicholas.robinson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nicholas.robinson/32/22188_2.png) [@nicholas.robinson](https://forum.inductiveautomation.com/u/nicholas.robinson)\
**Post date:** [October 8, 2021, 8:24pm UTC](https://forum.inductiveautomation.com/t/how-do-you-create-your-own-modl-file/51562/8 "2021-10-08T20:24:56Z")

</div>

@kingbetty511

I'm replying here because I went through this myself recently and I think my feedback might be helpful compared to someone who has huge amount of module design experience (i.e. my experience building modules is sub-novice).

All of this is basically in the SDK guide, but I will say that while reading the guide is indeed very helpful its not going to get you everything, you'll have to gather information from multiple sources. Be ready for that up front.

**Environment**

Install [JDK](https://www.oracle.com/java/technologies/downloads/) and install [intelliJ](https://www.jetbrains.com/idea/). The documentation says to install Maven but you actually don't need to because it is available inside intelliJ. You would use this alot once you get started:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/a/3a462bf15648c714b6b48d8a566516535cce5e3d.png)

**Examples**

The examples provided by Ignition are fantastic, at first get your environment set so you can build and install them. Don't worry about understanding everything, just get to the point where you can create a "modl" file and see what it does after you install it. Two that were extremely helpful to me:

[Scripting Function](https://github.com/inductiveautomation/ignition-sdk-examples/tree/master/scripting-function)  
[Webpage Example](https://github.com/inductiveautomation/ignition-sdk-examples/tree/master/gateway-webpage)

**Installing Unsigned Modules**

To do this, you'll need to edit this file:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/f/5f1b4e162eefcf0ae7a84ee962d49582c9a89cf1.png)

Note that depending on your laptop or company security policy, you may have to adjust the security properties of the file as an administrator in order to edit the file (I had to do this).

Then in the file you add the following text:

> wrapper.java.additional.7=-Dignition.allowunsignedmodules=true

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/4/f4a16566a5c5adbbe6963f0454d4100eb754fe9a.png)

After that you have to re-start the Ignition service for the change to go into affect (I use windows). Again for this step, depending on your security policy, you many need administrator rights to do this.

**Signing Modules**

This is talking about self signing. Anything above that I have not yet done. You need to utilize 2 different things: "keytool" which is provided when you install java and the [ignition module signer](https://github.com/inductiveautomation/module-signer).

What you get from the module signer git repository has to be build in intelliJ using

> mvn-package

Once its built you will have these files available:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/e/1e45dcd4b92a0710ca1bfb113c0cf111b04c72a6.png)

At first you need to run the key tool, this is an example of what that looks like. There are more sophisticated and automatic ways of doing this, but this shows the process in CMD.

```auto
CD C:\Program Files\Java\jdk-11.0.12\bin
CALL keytool -genkey -noprompt -alias Company -dname "CN=Company , OU=IT, O=Company , L=National, ST=State, C=US correct?" -keyalg RSA -keypass Password -storepass Password -keystore keystore.jks -validity 3650
CALL keytool -export -alias Company -storepass Password -file certificate.crt -keystore keystore.jks -keypass Password
CALL keytool -import -v -trustcacerts -alias Company -file certificate.crt -keystore cacerts.jks -keypass Password -storepass Password
CALL keytool -export -alias Company -storepass Password -file certificateChain.p7b -keystore cacerts.jks -keypass Password

```

Once you have done that, you will have these files, which are shown here already moved over into the same directory where the module signer lives:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/e/6e95f265ca950ee7825391152ecf5e9577c0e159.png)

The to sign the module you do this, again from CMD:

```auto
java -jar module-signer-1.0.0-SNAPSHOT-jar-with-dependencies.jar -keystore=keystore.jks -keystore-pwd=Password -alias=Company-alias-pwd=Password -chain=certificateChain.p7b -module-in=C:/Users/N0R01DF/Kafka/kafka-build/target/Kafka-Ignition-Module-unsigned.modl -module-out=C:/Users/N0R01DF/Kafka/kafka-build/target/Kafka-Ignition-Module-signed.modl

```

Then finally at the end of the yellow brick road you have your signed file and you're happily on your way.

**Building Javascript files (Webpage Example)**

This is in the webpage example but it took me a minute or two to figure out which is why I'll reiterate it here (for windows). You need to install this:

> **[GitHub - coreybutler/nvm-windows: A node.js version management utility for...](https://github.com/coreybutler/nvm-windows)**
>
> A node.js version management utility for Windows. Ironically written in Go. - GitHub - coreybutler/nvm-windows: A node.js version management utility for Windows. Ironically written in Go.

Once that is installed and you have your CMD (in admin mode) pointed at the javescript folder, you do this:

If its the first time and you have no npm installed:

```auto
nvm install latest
nvm use latest
# you can also specify a version from nvm list

```

Then to build the webpage example you do this:

```auto
npm run build:prod #r dev

```

Happy building!

Cheers,

Nick

---

<div class="post-metadata">

**Author:** ![nicholas.robinson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nicholas.robinson/32/22188_2.png) [@nicholas.robinson](https://forum.inductiveautomation.com/u/nicholas.robinson)\
**Post date:** [February 16, 2023, 5:35pm UTC](https://forum.inductiveautomation.com/t/how-do-you-create-your-own-modl-file/51562/9 "2023-02-16T17:35:55Z")

</div>

Adding here in case it can help someone, when building the JavaScript portion, if you get an error related to webpack, these commands may help:

```auto
nvm install latest
nvm use latest
npm i -g webpack webpack-cli
npm link webpack-cli

```

Thanks to @Allen_Miller for these pointers.

Cheers,

Nick

---

<div class="post-metadata">

**Author:** ![Ajay\_Gupta](https://avatars.discourse-cdn.com/v4/letter/a/f05b48/32.png) [@Ajay\_Gupta](https://forum.inductiveautomation.com/u/Ajay_Gupta)\
**Post date:** [July 13, 2023, 12:52pm UTC](https://forum.inductiveautomation.com/t/how-do-you-create-your-own-modl-file/51562/10 "2023-07-13T12:52:28Z")

</div>

I am very new to Ignition Modules development. I want to know which programming languages should I know or learn to be able to develop Ignition Modules?  
Can it be written only in Java?

Actually, I am planning to write a module which will have a user interface and do certain tasks - Database operations will be involved in it.  
So, what tools and languages can I use to accomplish this?

I come from a C# background. I have used Angular. I was wondering if I could use those.  
Any guidance will be appreciated.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 13, 2023, 1:34pm UTC](https://forum.inductiveautomation.com/t/how-do-you-create-your-own-modl-file/51562/11 "2023-07-13T13:34:37Z")

</div>

> [@Ajay\_Gupta](#):
>
> Can it be written only in Java?

Any JVM compatible language. Many IA people are switching to Kotlin. I'm a dinosaur--only Java in my modules.

---

<div class="post-metadata">

**Author:** ![Ajay\_Gupta](https://avatars.discourse-cdn.com/v4/letter/a/f05b48/32.png) [@Ajay\_Gupta](https://forum.inductiveautomation.com/u/Ajay_Gupta)\
**Post date:** [July 13, 2023, 2:02pm UTC](https://forum.inductiveautomation.com/t/how-do-you-create-your-own-modl-file/51562/12 "2023-07-13T14:02:33Z")

</div>

Thanks much!!  
So, that means I can use Jython as well which Ignition uses for scripting?  
What do you recommend for UI?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 13, 2023, 2:16pm UTC](https://forum.inductiveautomation.com/t/how-do-you-create-your-own-modl-file/51562/13 "2023-07-13T14:16:22Z")

</div>

> [@Ajay\_Gupta](#):
>
> So, that means I can use Jython as well which Ignition uses for scripting?

No. Jython does not produce JVM bytecode at compile time.

> [@Ajay\_Gupta](#):
>
> What do you recommend for UI?

I was convinced a few years ago that JetBrains IntelliJ (aka IDEA) was the best IDE. Haven't played with any other java IDE since.

---

<div class="post-metadata">

**Author:** ![Ajay\_Gupta](https://avatars.discourse-cdn.com/v4/letter/a/f05b48/32.png) [@Ajay\_Gupta](https://forum.inductiveautomation.com/u/Ajay_Gupta)\
**Post date:** [July 13, 2023, 2:24pm UTC](https://forum.inductiveautomation.com/t/how-do-you-create-your-own-modl-file/51562/14 "2023-07-13T14:24:40Z")

</div>

Sorry, I think i was not clear when I asked about UI.  
I didn't mean IDE for Java.

The module that i am planning will have a User Interface, it will do some tasks - DB operations involved. I meant, what do you recommend using for the User Interface in my Module?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [July 13, 2023, 2:26pm UTC](https://forum.inductiveautomation.com/t/how-do-you-create-your-own-modl-file/51562/15 "2023-07-13T14:26:13Z")

</div>

Why are you building a module instead of using Ignition directly?

---

<div class="post-metadata">

**Author:** ![Ajay\_Gupta](https://avatars.discourse-cdn.com/v4/letter/a/f05b48/32.png) [@Ajay\_Gupta](https://forum.inductiveautomation.com/u/Ajay_Gupta)\
**Post date:** [July 13, 2023, 2:31pm UTC](https://forum.inductiveautomation.com/t/how-do-you-create-your-own-modl-file/51562/16 "2023-07-13T14:31:38Z")

</div>

Let's say I want to manage the "Shipping" area of the plant. So, I want to develop a module for it which will do everything that is required in shipping section of the plant.  
I can then import this module for all the plants and configure it as per the needs.

I could do that with Ignition screens and scripting but I want to start building reusable modules which can be used across the plants.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 13, 2023, 2:51pm UTC](https://forum.inductiveautomation.com/t/how-do-you-create-your-own-modl-file/51562/17 "2023-07-13T14:51:43Z")

</div>

Ah. Your module would need to create custom UI components for the designer, either Vision components (extensions of java Swing), or Perspective components (extensions of React). There are sample projects in the IA examples github repo that provide the framework for such.

(You don't get any other choices.)

---

<div class="post-metadata">

**Author:** ![Ajay\_Gupta](https://avatars.discourse-cdn.com/v4/letter/a/f05b48/32.png) [@Ajay\_Gupta](https://forum.inductiveautomation.com/u/Ajay_Gupta)\
**Post date:** [July 13, 2023, 3:07pm UTC](https://forum.inductiveautomation.com/t/how-do-you-create-your-own-modl-file/51562/18 "2023-07-13T15:07:24Z")

</div>

Thank you very much. I really appreciate you taking the time to respond.

I'll explore these.
