deleting

Hi
I am newbie in Igor!
I execut my procedure but I do not know how can I delete some part of my program which I already executed?
For example I write program for appearing the buttons and after excute them , I decide to delete some of them but I can not!!!
Thanks foe helping
It is a bit difficult to understand what you actually want to 'delete'. Can you provide some more details, program code, or an example experiment?
Do you want to remove a button etc. from a control panel? There is the  KillControl command which might do what you want to achieve.
thanks a lot, it is exactly which I want.
I have another problem with my code that attached, I send my image from Labview and Igor plot my images in seperate Graph but I like Igor substitute every new image and at least I have one Graph instead of a lots of graph.

Best Regards
testing.pxp
I have not looked at your code. I suspect based on your statement that you want to investigate the command KillWindow to remove a graph before you make a new graph with a display command.

--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville
Yes,I exactly think that one way for to remove a graph is using killwindow or killwave and also I add Killwindow in my code but it is not work yet and a lots of Graphs are appear.
why does not it work?
I often use this:

Function foo(myWave)
Wave myWave

DoWindow/K myWindow
Display/N=myWindow myWave
etc
End


--Jim Prouty
Software Engineer, WaveMetrics, Inc.
I try with all of the suggestion but it does not work, killwindow should be good option but I do not know why does not work?
I need your help
it is my program:
Function AjustaImagen()

//Upload Image of Trap
GBLoadWave/O/N=wave/T={16,80}/W=1 "D:DATA:temporalIgor.txt"
Redimension/N=(640,480) wave0 //resize Image
Duplicate wave0 Trampa1 //Duplicate the original image
Display;AppendImage wave0
ModifyImage wave0 ctab= {*,*,Rainbow,0}

killwindow wave0
End
what is my mistake?
Try this modified version of your function:
Function AjustaImagen()
   
//Upload Image  of Trap
GBLoadWave/O/N=wave/T={16,80}/W=1 "D:DATA:temporalIgor.txt"
Redimension/N=(640,480) wave0      //resize Image
Duplicate wave0 Trampa1                 //Duplicate the original image
Display /N=MyGraph
String sWinName = S_Name  //save window name in string in case you do something later to change it
AppendImage wave0
ModifyImage wave0 ctab= {*,*,Rainbow,0}
killwindow  $sWinName
End


The graph name is not the same as the name of the wave displayed in it.
Thanks, I did it but unfortunately it kill all of my graph, I mean I have not any graph at least .
My gole is the cod can be replace the new image, so in final I have only one image.
saeed wrote:
Thanks, I did it but unfortunately it kill all of my graph, I mean I have not any graph at least .
My gole is the cod can be replace the new image, so in final I have only one image.


I think killing the graph(s) is the wrong thing for you to be doing.

You should create a graph for the first image, and then for the next images, use:

ReplaceWave [/X/Y/W=winName ] image=imageName , waveName<pre><code class="language-igor">

to update the image.

Or just copy the new image data over the old image data, leaving the graph alone.

--Jim Prouty
Software Engineer, WaveMetrics, Inc.
saeed wrote:
Thanks, I did it but unfortunately it kill all of my graph, I mean I have not any graph at least .
My gole is the cod can be replace the new image, so in final I have only one image.


Allright, that was an oversight on my part. Try this if you want to continue on this road. Otherwise give John's suggest a go.

Function AjustaImagen()
//check for prior existance of MyGraph graph; if it exists then kill it.
DoWindow MyGraph //V_flag is set to 1 if window exists; 0 otherwise
if(V_flag == 1)
  KillWindow MyGraph //kill the window
endif
//Upload Image  of Trap
GBLoadWave/O/N=wave/T={16,80}/W=1 "D:DATA:temporalIgor.txt"
Redimension/N=(640,480) wave0      //resize Image
Duplicate wave0 Trampa1     //Duplicate the original image
Display /N=MyGraph       //new plot window will have name "MyGraph"
AppendImage wave0
ModifyImage wave0 ctab= {*,*,Rainbow,0}
End