Browse another experiments procedures

Hi,

I love the ability to browse waves and bring them into a new experiment. Could we extend that to the procedures? I would love the ability to copy and paste some functions from one experiment into another. Yes I know I can separate out the procedure to a separate file and then load then in either adopting or just linking them. That however requires forethought that I do not always have. As I working on a project, I will recall that I had solved that problem before in another experiment. I have played around a bit with opening IP packed experiments in a text editor (BBEdit in my case) and the procedures are visible in clear text so there is a work around. It would just be nice to do it within IP it self. Perhaps import procedures to a new procedure window?


Andy
You can use the Search Igor Files tab of the Help Browser to search through packed experiments (if you check the "Search in packed experiment files" checkbox). Then if you click on the link for a hit, you can choose to open the procedure file. I know that's not quite what you were asking for but as far as I can think of this is the closest thing we have.
@hegedus: The Igor PXP structure is documented in Technical Notes\Igor Pro Tech Notes\PTN003 Writing Packed Files so in principle you could read parts of a PXP from within Igor Pro. Some sample C code is included as well. If it is worth the effort is not my call ;)
I always use this 'solution':
- open a second Igor instance
- drag the experiment file with the required procedure (or function within the standard procedure window) into this instance
- copy and paste from one window into the other
- close second instance

I actually often leave one or two instances open to compare previous analysis results quickly. Works quite well. I actually would rather like a functionality to drag-and-drop / copy-paste a wave from one window into the other for a quick comparison of data (browse experiment works well enough though ;-).

chozo wrote:
I actually would rather like a functionality to drag-and-drop / copy-paste a wave from one window into the other for a quick comparison of data (browse experiment works well enough though ;-).
save/c/o targetWave quickly allows one to save the target wave as an ibw (e.g., targetWave.ibw), which can then dragged into a new experiment and loaded. It's possible to make something slightly more elaborate that, for example, saves the wave, copies to clipboard a loadwavecommand (with the user-chosen file save path embedded), which can then be run in the other instance of Igor.

On the topic of procedures files, one could programmatically save procedure files (e.g., http://www.igorexchange.com/node/7500) and then drag them to a new experiment. Slightly faster transfer between open pxps could be achieved by also copying to clipboard an #include line. However, I don't believe that this can address Andy's original request for access to procedures closed pxp files.


For Igor 6.37 on windows one can start with a sort of a solution like so:

All my experiments saved with the above mentioned version and platform have the following structure:
\x00\x00\x00\x00\x00\x00\x00\*\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00
Experiment recreation section until \x07\x00\x00\x00\x00\x00\x00\x00\x05\x00\x00\x00, (proc win text)

Here, if you've dragged and dropped a function into the experiment, you would have something like:
OpenProc/W=(758.25,190.25,1204.5,604.25)/P=home "fn_import.ipf"
You can parse the line and load the function, substituting home for the experiment's path.

\x07\x00\x00\x00\x00\x00\x00\x00\x05\x00\x00\x00
find proc window text until EOF

Here, you can directly look for functions and load them or get their source.

It is a hacky solution and will work with minimum effort once the proper binary headers are tweaked.

best,
_sk