The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Closing Graph Window After Embedding in Cell
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

dbaileychess

4 Posts

Posted - 12/17/2009 :  12:41:22 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
OriginPro 8.1 SR0
8.1.10.86
Windows XP

After using the x-function insertGraph the graph window gets correctly embedded into the cell I want, however, the original graph window stays open. I would like to close that window so it doesn't clutter up my workspace. However, if I try to close that graph window, it also deletes it from the embedded cell I just put it in. Is there a way to remove the "copied" graph file from the workspace and just leave its reference in the embedded cell? Thanks.

easwar

USA
1964 Posts

Posted - 12/17/2009 :  12:52:15 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Looks like you are not embedding, but instead putting a link to the graph in the cell, which then leaves the graph page as it is, and so when pressing X on that window it deletes the graph?

Try adding embed:=1 to the line where you call the XF.

Also your should patch your installation to latest service release for 8.0, which is SR6.

Easwar
OriginLab
Go to Top of Page

dbaileychess

4 Posts

Posted - 12/17/2009 :  1:03:34 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
OriginPro 8.1 SR1
8.1.13.88 (Student Version)
Windows XP

I could only get up to SR1 using the update tool.

Here's my code

range r = "Graphs"!$(ii-1)[$(jj):$(jj)];
insertGraph gname:=graphname$ embed:=1 resizecell:=1 cell:=r;

So I am definitely embedding it. I can manually click the X close button on each of the graphs and that does what I want, but I will hundred of graphs to close like that. So I was trying to use this to close them:

win -cd %(graphname$);

which does close the window, but deletes the embedded graph in the cell, so I end up with nothing.
Go to Top of Page

easwar

USA
1964 Posts

Posted - 12/17/2009 :  1:17:07 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

My apologies, you have 8.1 and not 8.0....the latest SR for 8.1 is SR1, so you are up to date.

After you run the code, click on the cell that has the graph showing. What do you see in status bar at bottom left? Does it say "linking:Graph1" or "embedding:Graph1"?

If the page is still around and closing page is deleting graphs, it looks like for some reason it is linking and not embedding for you.

Easwar
OriginLab
Go to Top of Page

dbaileychess

4 Posts

Posted - 12/17/2009 :  1:23:09 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
The status bar showed: embedding:Graph115

When I have the:

win -c %(graphname$)

the cells where I am embedding the graphs get populated and resized, but then when the win -c %(graphname$) is ran, the graph disappears from the cell, but the cell is still resized correctly.

I put in a togglepoint at the win -c command and the graph exists in the cell before that, but then is gone. So to me it seems like the insertGraph function needs to be modified so when embed:=1 it closes the original window.
Go to Top of Page

Laurie

USA
404 Posts

Posted - 12/17/2009 :  5:21:53 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you for sending us your project. We will be emailing you with an answer.

OriginLab Technical Support
Go to Top of Page

minimax

351 Posts

Posted - 12/18/2009 :  02:32:03 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Derek,

Sorry for the inconvenience.

Would you mind to try if the following workaround works for you?

Add a script
sec -p 0.1;
right before the script
insertGraph gname:=graphname$ embed:=1 resizecell:=1 cell:=r;


sec -p 0.1;
is used to suspend the script for a specified number of seconds. You may need to increase the time to avoid the problem if 0.1 is not enough.

We will fix our code (tracker #14865) so that suspend is not needed.

Max
OriginLab Technical Support
Go to Top of Page

dbaileychess

4 Posts

Posted - 12/18/2009 :  09:43:25 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I tried the

sec -p 0.1;

command and it worked, thanks. Thanks for taking the time to look into it for me, and I hope that you find the bug.
Go to Top of Page

minimax

351 Posts

Posted - 12/19/2009 :  12:28:58 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Yes, It would be fixed in next release, probably Origin 8.1SR2.

Max
OriginLab Technical Support
Go to Top of Page

seraulu1

USA
2 Posts

Posted - 02/16/2010 :  03:32:57 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks for the suggestion

Edited by - seraulu1 on 02/16/2010 03:45:19 AM
Go to Top of Page

seraulu1

USA
2 Posts

Posted - 02/16/2010 :  03:40:37 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks for the suggestion

Edited by - seraulu1 on 02/16/2010 03:44:28 AM
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000