Procedure Loader
A utility to load or unload procedure files from the User Procedures or Wavemetrics Procedures folders. When you have a collection of procedure files installed in the User Procedures folder this user interface provides a convenient way to search for, add, or remove a procedure from the current experiment.
Adds a "Load or Unload Procedures" item to the File menu and, rather presumptuously, takes over the cmd-1/ctrl-1 shortcut.
How to install
It makes sense for this procedure to be loaded at startup, so a good place to store it is in the Igor Procedures folder (see Help > Show Igor Pro User Files). If you use the IgorExchange installer to install the procedure loader it will by default be installed in the Igor Procedures folder.
Options
Click the cog icon to change advanced settings.
Fast Search: Faster to build the list of procedures, but intolerant of semicolons in file paths.
Show File Path: Hover over a procedure name to display the file location within the Igor Pro User Files folder.
Compiler Directives: Hover over a procedure name to display Pragma statements from the procedure file.
Open IM: Allow independent modules to be opened for editing when the loaded procedure is double-clicked. Other procedure windows can always be opened this way.
Obsolete WM procedures: By default these are hidden.
Drag & Drop: Drag procedures from one list to the other to load or to unload.
Hidden Procedures: Developers can hide certain procedures from the procedure loader. 'Show hidden procedures' overrides this setting, and is not recommended for normal use.
Don't Check Igor Version: enables loading of procedure files with an incompatible IgorVersion pragma.
Create Optional Includes: include statements will include the 'optional' keyword
How to hide a procedure file from the procedure loader
Insert a comment in the procedure, somewhere near the top, with the instruction 'Procedure Loader Hide'. The comment must be within 20 lines from the start of the file. This method may be revised in future versions, but for now this seems to work tolerably well.
// Procedure Loader Hide
Project Details
Current Project Release
IGOR.7.00.x-2.53
Release File: | UserProcLoader253.zip (26.18 KB) |
Version: | IGOR.7.00.x-2.53 |
Version Date: | |
Version Major: | 2 |
Version Patch Level: | 53 |
OS Compatibility: | Windows Mac-Intel |
Release Notes: |
Fixes a compatibility problem for Igor Pro 7 |
Forum
Support
Gallery
Igor Pro 9
Learn More
Igor XOP Toolkit
Learn More
Igor NIDAQ Tools MX
Learn More
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()
though.
It also does currently not follow windows style shortcuts to folders. The function
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
but would require that you extract it out of MIES.
EDIT: I'm on windows
December 18, 2019 at 06:19 pm - Permalink
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.
December 19, 2019 at 01:44 am - Permalink
In reply to Thanks for publishing that… by thomas_braun
@thomas_braun
should now follow shortcuts and aliases to files and folders on both mac and windows.
December 20, 2019 at 09:13 am - Permalink
while updating this code I discovered two things that make no sense to me:
IndexedFile(path, -1, "????")
// this won't compile:
wave /T w
w = ParseFilePath(0, w, ":", 1, 0)
December 20, 2019 at 09:23 am - Permalink
@tony: Thanks for the update.
wave /T w
w = ParseFilePath(0, w, ":", 1, 0)
End
does compile here on IP8.
December 20, 2019 at 11:03 am - Permalink
wave /T w
w = ParseFilePath(0, w, ":", 1, 0)
End
Works in Igor 9, too. I guess this converts the paths like "C:folder:file.txt" in the text wave to just "file.txt".
That kind of code needs an explanation comment.
February 27, 2024 at 09:23 am - Permalink
@JimProuty
That exchange about the wave assignment dates back to 2019, and whatever was going on back then is long since forgotten :)
Your point about commenting abstruse code is well taken.
February 27, 2024 at 09:34 am - Permalink
Regarding
IndexedFile(path, -1, "????")
In Igor 8 Indexed file doesn't have an optional parameter for the separator string. Igor 8 always uses a ";" separator to separate the list. Apparently you can use that character in a file name(!).
So Igor 9 has a new optional separator parameter so you can avoid the problem. I don't think that "\r" is a valid file name character, so I'd try that. Use "????" for the optional creatorStr you'd need to specify in order to get to the last optional separatorStr parameter.
February 29, 2024 at 09:33 am - Permalink