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 for Programming
 LabTalk Forum
 calling pe_mkdir via LabTalk

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
oricom Posted - 08/31/2006 : 06:52:25 AM
Hello,

I am calling origin via com automation (from python)
Normal LabTalk commands work, while the extended commands like
pe_dir, pe_mkdir and pe_cd fail
If I enter these commands into the command window of my com server session, they fail with a command error, during a normal origin session they work.

import win32com.client as w32
origin=w32.Dispatch("OriginApplication")
origin.Execute("doc -mc 1")
# this works
origin.Execute("win -t data MASTER Name")
# this fails
origin.Execute("pe_mkdir(\"a\")")
# if I enter pe_mkdir(a) into the now running session, I get a command error.


Origin Version 7.5:
Operating System: XP


many thanks

Frank
4   L A T E S T    R E P L I E S    (Newest First)
oricom Posted - 09/04/2006 : 09:21:21 AM
Hi Zachary,

I did a new install with version 7.5885,
this works without problems.


many thanks for your help!


Frank
zachary_origin Posted - 09/03/2006 : 10:54:19 PM
Really strange. By default all the .c files under the system folder of Origin are autocompiled as Origin application is launched. LT_PE.C is also compiled without exception.

When ran the scripts you provided, I got the results as followings:

err=run.loadOC("OriginLab\LT_PE.C");
err=;
ERR=0
pe_dir();
Data1

I have tested the scripts in several computers, it works for all.

So can you tell me the build of your Origin? You can get it by >Selecting Help:About Origin or >type @v= in command window.



Zachary
OriginLab GZ Office
oricom Posted - 09/01/2006 : 06:46:25 AM
Hello Zachary,


thank you for your fast reply and for doing the test install.
I think I located the problem outside of the com interface.
If I run the code it still doesn't work, neither from python nor from the script window.
If I open the Code Builder, select LT_PE.C and RebuildAll both work (I instantaniated OriginApplicationSI to try this, sorry for the typo in Application in my last post).

So it seems on starting the COM server, LT_PE.C is not linked
I tried to manually load the file, but failed:
err=run.loadOC("OriginLab\LT_PE.C");
err=;
ERR=4
pe_dir();
#Command Error!
after pressing the build button pe_dir() works, as if origin was run from the start menu.

LT_PE.C is in the System folder, so it should be available automatically on startup?


Thanks

Frank


zachary_origin Posted - 08/31/2006 : 12:58:48 PM
I am not familiar with python.
But I tried to the following scripts in PyWin32 build 209.1 and Python 2.5, it works well.

import win32com.client as win32
origin=w32.Dispatch("Origin.Application")
#is there any difference between OriginApplication and Origin.Applicaiton? Using the former, I can not open Origin.
origin.Execute("doc -mc 1")
origin.Execute("win -t data MASTER Name")
origin.Execute("pe_mkdir(\"a\")")

Origin 7.5 & OS:XP sp2

Zachary
OriginLab GZ Office

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