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
 All Forums
 Origin Forum
 Origin Forum
 Need help for automation project

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
jean_galy Posted - 02/24/2005 : 07:51:32 AM
Hi all,

I need some help in building a VB project which would send data to origin and draw a graph but with options defined in the VB project.
My biggest lack of information is about the origin object properties and methods.


So far I have:

Public Sub makegraph()
'make a connection to Origin
Set myorig = GetObject("", "Origin.ApplicationSI")

myorig.Execute ("Reset")

'Put data in range datasheet
myorig.GetWorksheet("data",) <--- here I dunno what are the parameters to be put in

then for the graph how car I set up the parameters (ranges, axes, etc)??

'Wait for the Origin AutoUpdate process to finish
myorig.Run


'end origin
'myorig.Execute ("exit")

End Sub

----

Any help is welcome.

Many thanks in advance.

Jean

NB: I know that thereR examples in the Samples folder but they don't describe the details I need :-(





Origin Version (Select Help-->About Origin):7.5
Operating System: Windows XP SP2

3   L A T E S T    R E P L I E S    (Newest First)
easwar Posted - 02/24/2005 : 11:11:53 AM
quote:

So if I understand correctly, I could prepare script for changing the scale of the graph in a defined project and call it through my VB application and pass to the origin embedded script the parameter. is that right?



Hi Jean,

Yes, you can prepare LabTalk script .OGS files in advance, or Origin C functions in advance and call either from your VB app by seding the appropriate LabTalk command (run.section(filename, section name) for OGS files for example, and directly calling the OC function name for Origin C for example).

Look at the Excel example (which uses VB macro) under \Samples\Automation Server\Excel\DoseResponseCurveFitting.XLS for example.

As for documentation of methods, that should be under the following help file:
Programming help file, and section:
Calling Origin from Other Applications(Automation Sever)->Methods and Properties.

I also recommend you get the free SR5 patch for your 7.5 installation if you have not already. A new method of connecting called ApplicationCOMSI was added in this patch, which then enables the client to repeatedly connect to one consistent instance of Origin even if there are multiple Origin sessions running on the machine.

Easwar
OriginLab

jean_galy Posted - 02/24/2005 : 10:04:21 AM
Hi Easwar,

Thanks for the prompt answer ;-)

So if I understand correctly, I could prepare script for changing the scale of the graph in a defined project and call it through my VB application and pass to the origin embedded script the parameter. is that right?
OK I'm gonna try that.

On the other hand, under the Help/Programming I couldn't find teh desription of the ".getworksheet", ".putworksheet" and etc. Am I looking at the right place?

Many thanks again for the help.

Jean

easwar Posted - 02/24/2005 : 09:35:20 AM
Hi Jean,

All methods and properties currently available for the Origin COM server object are documented in the help files. With these current methods and properties, there is no direct access to all Origin objects and their associated properties such as graphs etc. There is a general .Execute method that can send script command strings that you are already familiar with. This method can then be used to run Origin C routines as well, and under Origin C there is ample access to all Origin objects and their properties.

So in other words, there is no direct access to everything to code it all in VB - you will need to either send script command strings, or call Origin C functions. Note that script commands can be sent to load and compile specific Origin C functions, or such functions can already be present in the default Origin workspace. Another method is to have custom Origin projects that have attached Origin C files that perform specific tasks, which is what some of the examples in this area utilize.

Easwar
OriginLab



The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000