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
 Connect/Link Cells
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Eberhard2010

8 Posts

Posted - 02/15/2011 :  1:42:53 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. 8.5.0G and Service Release (Select Help-->About Origin): SR1
Operating System: Windows7

1)
I use frequently the "Style Panel".
There is a button to "connect / link neighboring cells".
Do you have any idea how this works in a labtalk script?

2)
Is there an Arithmetic operation modulo available or something similar I can use?

Regards Eberhard

Eberhard2010

8 Posts

Posted - 02/15/2011 :  2:56:45 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Here I put some Code for you to get an idea:
*************************************************
string strBk$=page.name$;
string strSh$=page.active$;

range wksh=[strBk$]strSh$!; //This is the sheet range

wksh.userParam1=1;
wksh.userParam1$="Vds";

p=2;

//Have to use different ranges
range cc1=[strBk$]strSh$!wcol(p);
range cc2=[strBk$]strSh$!wcol(p-1);
range cc3=[strBk$]strSh$!wcol(p+1);

cc1[vds]$="test";
cc2[vds]$=cc1[vds]$;
cc3[vds]$=cc1[vds]$;
//works fine until here!

//Now comes the interesting part:
//The next line should assemble cc1-cc3 [vds]-Field together
//Assemble means: displaying as one field over tree columns
//As they are neighbours it should work somehow
cc1[vds].combine(cc2:cc3);
*********************************************

Has anybody the correct command for the last line for me?
Hav'nt found any X-Function nor labtalk one.
Perhaps some Cell->Style function?

Regards Eberhard
Go to Top of Page

Sam Fang

293 Posts

Posted - 02/16/2011 :  01:49:08 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
We have OriginC function MergeCells to merge cells.

For details, select Help: Programming: Origin C from Origin menu. See Origin C Reference: Classes: Internal Origin Objects: Grid: MergeCells.

We have no such LabTalk function currently. I have reported it as ORG-2253. We will provide such an LabTalk function in the future.

Thanks.

Sam
OriginLab Technical Services

Edited by - Sam Fang on 02/16/2011 01:52:57 AM
Go to Top of Page

Sam Fang

293 Posts

Posted - 02/21/2011 :  10:01:24 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
This can also be done by using doMenu. The button id should stay constant even though we have not published them. Here is an example.

work -s 1 2 2 3;// select C1R2:C2R3
domenu hex(88e5);// merge cell button is 0x88E5
col(1)[2]$="junk";
wcellsel;// clear selection


Sam
OriginLab Technical Services
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