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
 Forum for Origin C
 Sending commands to script window from Origin C
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

pi3e1415pi

USA
Posts

Posted - 11/03/2007 :  7:30:19 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I am trying to do something simple:

after an ascii data set (with four columns) is dragged onto the origin window, I want to add an extra column.

I have taught myself about the import wizard and how that works, and I use the advanced settings to successfully load a *.c file.

Now, in the script window I can simply type

//
Worksheet -a 1;
//


to add a column.

What is the best way to send this command to the script window from my *.c file?

( I know that you can also do wks.AddCol(); , but there are other Worksheet commands that I want to use, renaming a column for example, that I don't know the specific class/syntax for).

Thanks a lot!

Mike Buess

USA
3037 Posts

Posted - 11/03/2007 :  11:26:14 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Use LT_execute("worksheet -a 1"); from your Origin C code. However, if you are going to use Origin C at all you'll be much better off learning the relevant OC code. For example, you can rename the new column when you create it... wks.AddCol("column name").

Mike Buess
Origin WebRing Member
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