VS Code Extension - Creating Program Folders | MUSE
In this video, you’ll learn how to create and configure program folders using the MUSE extension for Visual Studio Code. We’ll walk through setting up a new project, defining program details, and choosing your programming language. You’ll also see how to generate and understand key files like program.json, and how these components work together to deploy and run scripts on your MUSE controller. By the end, you’ll have a solid foundation for organizing, managing, and deploying your MUSE applications.
What You’ll Learn:
• Creating a new program folder using the MUSE VS Code extension
• Defining program details and selecting a programming language
• Generating and understanding essential files like program.json
• How program files interact with the MUSE controller
• Deploying and running scripts from VS Code
• Organizing projects for scalable MUSE development
Hello, and welcome to this video on creating program folders with the MUSE VSCode extension. Program folders contain all the files you want to load to the controller to run any given script. This process also runs through the basic setup of a script to help create the program.json file that will be loaded to the controller.
To begin, open up VSCode. Click the File menu option and select Open Folder. Browse to the location you would like to save your files or create a folder in the Open Folder browse window. For this example, we’ll create a folder called Example Program. Click on the folder and press the Select folder button.
Now, you should see the Example Program folder name at the top of the Explorer section of VSCode. Right-click on the empty space below Example Program and select Create MUSE Local Program from the menu. You should now see a dialogue box at the top of the VSCode screen.
From here, we will be prompted for 5 pieces of information. When you’re done with each prompt, press enter to move on to the next prompt or if there is a list of options, click on the available option you want. Let's get into the details of each option.
The first option is to type in a name for your program. This is a friendly name, and not the name of the file VSCode will create. We’ll call the program Conference Room.
The following prompt asks for a basic description of the program. This description will not affect your script; it’s just a friendly description for anyone who looks at the code after you. Type in your description and press enter or to leave it blank, just press enter.
The next option is to enable or disable your program after creation. This prompt is asking if you want your program to automatically run when it is loaded to the controller. For most installations, you should click or type in enable.
Next, we will select what language we are using. You can choose from any of the languages supported by MUSE such as Groovy, Python, or JavaScript. For this example, we are using Python. Click on the language you would like to use.
The next option asks us for the name of the scope the script will run in. Just pressing Enter will assign the script to the default Global scope. Either press enter or type in the name of the scope you would like to use and press enter. For this example we will be using the global scope and just pressing enter.