CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Calling a string variable in the tui via a journal.

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By blackmask

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 29, 2013, 14:08
Default Calling a string variable in the tui via a journal.
  #1
New Member
 
Etienne
Join Date: Mar 2013
Posts: 2
Rep Power: 0
Donelaria is on a distinguished road
Hello everybody,

I'm new to fluent 6.3.26, and so far, this forum helped me so much! But on this one, I can't find any answer anywhere! So here's the deal :

I'm currently learning how to code in scheme language, and how to handle the text user interface in the same time. And I dont find how to call in a journal (text user interface language) a string variable.

Code:
(define name "my_project")
(define path "C:\my_path\")
(define path_transcript (string-append path name "_transcript.txt"))

/file/start-transcript
path_transcript
I found, the tui would see "C:\my_path\name_transcript.txt", but sadly in only sees "path_transcript"... which of course doesnt do the trick for my script, ahah.

I tried :
(display path_transcript)
(write path_transcript)

But none of these worked!

NB : another thing, I noticed that I couldn't end a string charactere with "\"... ? Which of course is kind of annoying when you have to set up directories of your computer... Any clue on that one?

If you have any hints, I'd really appreciate!

Thank you and have a nice day!
Donelaria is offline   Reply With Quote

Old   April 29, 2013, 22:33
Default
  #2
Senior Member
 
Join Date: Aug 2011
Posts: 421
Blog Entries: 1
Rep Power: 22
blackmask will become famous soon enough
From the experience of other language, you might need to escape your backslash, e.g.
(define path "C:\\\\my_path\\")
Donelaria likes this.
blackmask is offline   Reply With Quote

Old   May 2, 2013, 10:22
Default
  #3
New Member
 
Etienne
Join Date: Mar 2013
Posts: 2
Rep Power: 0
Donelaria is on a distinguished road
Since I didn't manage to call a variable using the tui commands, I got around the issue by using the unix command sed (aka stream editor) which is really handy to script in batch for massive search and replaces.

And in the end... I had to escape my slash indeed! So huge thanks, Blackmask, for the idea!
Donelaria is offline   Reply With Quote

Reply

Tags
journal file, string, tui


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I convert GUI journal to TUI journal harry FLUENT 7 December 4, 2013 17:28
emag beta feature: charge density charlotte CFX 4 March 22, 2011 10:14
How to get TUI journal ringtail FLUENT 5 July 18, 2010 12:51
error in COMSOL:'ERROR:6164 Duplicate Variable' bhushas COMSOL 1 May 30, 2008 05:35
Replace periodic by inlet-outlet pair lego CFX 3 November 5, 2002 21:09


All times are GMT -4. The time now is 15:02.