Procedure Loader

A utility to load or unload procedure files from the User Procedures or Wavemetrics Procedures folders.

Procedure loader screenshot

I wrote this originally for users who didn't use Igor regularly enough to recall how to load procedure files that I had distributed, once I had persuaded them to store the files in Igor's User Procedures folder. I've since found that it's actually quite convenient to have this available all the time, so it has become one of my own "default includes".

A similar utility was posted as a code snippet by thomas_braun.

It makes sense for this procedure to be loaded at startup, so a sensible place to store it is in the Igor Procedures folder (see Help > Show Igor Pro User Files). Personally, I keep only one procedure file in the Igor Procedure: a file that has the sole purpose of including my personal selection of user procedures and Wavemetrics procedures at startup. It looks like this:

Default Includes screenshot


 

 

 

Project Details

Current Project Release

UserProcLoader IGOR.7.00.x-1.30

Release File: UserProcLoader.zip
Version: IGOR.7.00.x-1.30
Version Date: Mon, 03/30/2020 - 05:59 am
Version Major: 1
Version Patch Level: 30
OS Compatibility: Windows Mac-Intel
Release Notes:

Introduces compatibility with Project Updater package

Preferences are now configurable and retained across experiments.

View All Releases

Thanks for publishing that. I've played around with it, it is much more useful than my hack.

 

I had to tweak one line in recursiveProcList()

SpecialDirPath("Igor Pro User Files",0,0,0) + "User Procedures"

though.

 

It also does currently not follow windows style shortcuts to folders. The function

GetAllFilesRecursivelyFromPath

I'm using at https://github.com/AllenInstitute/MIES/blob/31b2bdd7722bd66bb8f412a8631… supports shortcuts but is slower as it supports semicolons in names as well.

Using that could be done with something like

string str = GetAllFilesRecursivelyFromPath("tempPathFF")
return replacestring("|", SortList(GrepList(str, ".*\.ipf$", 0, "|"), "|"), ";")

but would require that you extract it out of MIES.

 

EDIT: I'm on windows

Thank you, Thomas.

Good catch of the SpecialDirPath - that would lead to problems if ipf files are stored in User Files but outside of User Procedures and Igor Procedures.

And yes, the relatively simple recursiveProcList() doesn't follow shortcuts on either platform. This was originally for end users who would install packages only in the  User Procedures folder - my installer doesn't allow other options - so didn't need the complication of following links. But, since files can be #included that way, I should probably think about an update. I'll take a careful look at your GetAllFilesRecursivelyFromPath() function. I also discovered a lot of other useful utilities in your repository file! Thanks for that.

while updating this code I discovered two things that make no sense to me:

// this returns a list of filenames using a separator string that's legal in filenames on both mac and windows:
IndexedFile(path, -1, "????")

// this won't compile:
wave /T w
w = ParseFilePath(0, w, ":", 1, 0)

 

@tony: Thanks for the update.
 

Function dostuff()
    wave /T w
    w = ParseFilePath(0, w, ":", 1, 0)
End

does compile here on IP8.

Forum

Support

Gallery

Igor Pro 8

Learn More

Igor XOP Toolkit

Learn More

Igor NIDAQ Tools MX

Learn More