Then, as mentioned earlier, the first function we set up is CheckEnv().
This is so we can attribute to it, due to it being used frequently, so this saves time and formats the code nicely.
One of the first things is define a global variable var df. With the web page done, we need to do the behind the scenes code to actually parse the CSV and tell the printer to create a label. This is a basic web app to print downloaded parts data from partsbox.io as labels.ĭrag the downloaded csv data here or select it with choose file.Īll of that gives us a simple but functional web page that does all we need it to.
At the top I imported B ootstrap for some very quick and easy styling (optional) and then imported two JavaScript files, the first being the download Dymo framework from earlier and the second being a custom JavaScript file where we will write our code to tie it all together. Instead I recommend having the web page hosted on GitLab and then if changes are made the user can pull the latest version before opening the page locally in their browser.įor the basic web page I created a single html file. Just plug and print!īecause the web page is talking to a locally plugged in printer, this won’t work if hosted online (security issues). No pop up menus, no selecting the right printer, no import wizards. On the page a user can import or drag a downloaded CSV file from partsbox and then upon clicking the print button the page prints a label for each part included in the CSV. As we’re using the web service pack we’re going to create a basic web page (styling can be saved for another day). From here we can start creating our process for printing the labels. Additionally make a note of these as you’ll need the reference names later.Īfter the layout is done save it somewhere safe so we can import it later and close down the Dymo software. Here I would advise that you preface each of the reference names with a constant in case you need to search through the XML for adjustments. This can usually be found by right clicking > properties > advanced. One important step here is that each component of the label needs a reference name setting. Opening the ‘Dymo Label v.8’ and selecting a label type / size, you’re ready to add the components you need. Well, it’s not required but it is easier if you don’t fancy writing out all the layout XML yourself. This is the only time we have to open up and use the included software. The first step is we need a layout for the label. With that in mind, we should be able to get this printing. The one reference that does have some benefit is the documentation for the JavaScript framework we downloaded. The very few examples it gives for JavaScript aren’t event complete. The SDK, SDK documentation and framework overview aren’t great from Dymo and commonly are either outdated or don’t work.
(Sadly this is for Mac and Windows only as Linux is not supported). You can check if you have the web service correctly installed by following this blog post from Dymo themselves.
Save a copy of the Dymo JavaScript Framework.
So lets discuss how we can automate our printing! Since August 2016, the Dymo Label Web Service is automatically installed along with the Dymo Label Software. By automating it we could save time on not selecting the correct paper-size and printer, going through a wizard and assigning data to label fields etc.
The software that comes with the printer does include a way to print from a CSV file, but it requires importing it and going through a wizard each time. Partsbox lets you download a CSV file containing all the information about the selected parts, so ideally we wanted a way to import the CSV and have the Dymo print out a label for each part, no fuss! It’s clunky to use and more importantly it’s a hassle trying to get it to automate printing labels. The problem with this, and the Dymo label printer, is the software for it… isn’t great. Part of the new storage plan is labelling all the components with a custom printed label that contains the relevant information for us, including a QR code that when scanned responds with the partsbox URL for that particular part so you can immediately view all the information on it. For more information on how they went about it, a handy guide from partsbox themselves explains it perfectly. So, with that in mind, Alex and Pat set out to organise all the stock using partsbox.io. As more projects get taken on, more parts and bits appear around the office and there comes a point where you’re hunting around for a particular thing and you realise that enough is enough! Recently at DefProc there’s been a shift towards organising, a late ‘spring clean’ if you will.