how to extract code after manually editing graphs
Forum
Support
Gallery
Igor Pro 10
Learn More
Igor XOP Toolkit
Learn More
Igor NIDAQ Tools MX
Learn More
Forum
Support
Gallery
Learn More
Learn More
Learn More
HI,
Save the recreation macro. Control-Y to bring up the dialog. All the code used to create the graph as currently displayed is now in the procedure window.
One side note: The image shows the graph in tools mode. If you save recreation marco it will also save the tools mode open. When I build GUI I have remember to turn off tool mode before saving.
Andy
September 15, 2018 at 07:15 am - Permalink
In reply to HI, Save the recreation… by hegedus
Thank you for the response.
I don't think I am doing this right though.
As can be seen in the image attached, I do get a block of code I can add to my ipf but when I run it again, it doesnt produce a plot and subplots in the same settings.
September 15, 2018 at 07:28 am - Permalink
In reply to HI, Save the recreation… by hegedus
Also, I thought it was generally not good practice to use macro. I thought it would be better to hard code it in my user defined function..
September 15, 2018 at 07:37 am - Permalink
First, you only need the Graph Macro. You do not need the Graph Style.
Secondly, yes ... the recreation code is a macro. You can change it to a function call with no real problems. One way is to change the entry and exit points, for example from `Window Graph..` to `Function myGraph()` with `end` rather than `EndMacro`. The other way is to copy + paste segments of the window recreation code in to your own function as appropriate to what parts you need your function to do.
September 15, 2018 at 07:45 am - Permalink