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
 LabTalk bug in Origin 2015

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
mduds Posted - 11/01/2014 : 10:43:44 AM
There is a bug in Origin 2015 which broke several of my macros:

The LabTalk command "GetFileName" does not work correctly.
It opens the file dialog, but after chosing a file, the vaiables %A(should contain the file name) and %B (should contain the full path to the file) contain only garbage or nothing.

Manfred
3   L A T E S T    R E P L I E S    (Newest First)
cdrozdowski111 Posted - 11/03/2014 : 05:53:48 AM
I would be reluctant to rely long term on dlgfile assigning %A to the file name as, indeed, it isn't mentioned in the docs and may be subject to change.
mduds Posted - 11/03/2014 : 04:21:17 AM
Thank you, it works.

Interestingly, the X-Function dlgfile returns the full path with file name in the string "fname$", but also sets the variable %A correctly to the file name only. This is not mentioned in the documentation.

Manfred
cdrozdowski111 Posted - 11/01/2014 : 1:19:50 PM
There is a bug in 2015 SR0 with the LT getfile command that causes %A & %B to not work correcttly when files are on a different drive than your main drive. It is fixed in the next SR. I assume you have the same bug even if using the getfilename command.

In the meantime, you could switch over to using the X-Function dlgfile (http://www.originlab.com/doc/X-Function/ref/dlgFile) to get the selected file name into a string variable. Then use the methods of the String object to get the parts of the full file name you need to work with (http://www.originlab.com/doc/LabTalk/ref/String-obj).

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