Specify path for UniformExcitation

For posts concerning the documentation, errors, ommissions, general comments, etc.

Moderators: silvia, selimgunay, Moderators

Post Reply
jpu
Posts: 7
Joined: Mon Jan 10, 2005 2:49 am
Location: Zurich
Contact:

Specify path for UniformExcitation

Post by jpu » Sun Mar 13, 2005 10:39 am

I am having something like this

set dt 0.01
set AccelSeries2 "Path -filePath C:\PreOpenSeesPost\Matlab\Examples\Seisme31_1.g3 -dt $dt -factor 1000"

# Create UniformExcitation load pattern
pattern UniformExcitation 2 2 -accel $AccelSeries2

But openSees can not find the file: C:\PreOpenSeesPost\Matlab\Examples\Seisme31_1.g3

What is the correct syntax for specifying the path?

silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Post by silvia » Mon Mar 14, 2005 9:14 am

what error do you get?
does the file actually exist?
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104

jpu
Posts: 7
Joined: Mon Jan 10, 2005 2:49 am
Location: Zurich
Contact:

Post by jpu » Mon Mar 14, 2005 9:58 am

silvia wrote:what error do you get?
does the file actually exist?
Yes the file exist, and I am not getting any error. Try and see my comment on that under Interpreter and the topic 'Too Stable'.

I am working under windows.

Btw. before when I specified an output file for recorder, something like
recorder Node -time -file C:\Examples\GenerateModel\T3\T3.dat -node 17 18 19 -dof 1 2 3 4 5 6 disp
worked perfectly well

but now she (or is openSees a male?) wants
recorder Node -time -file C:\\Examples\\GenerateModel\\T3\\T3.dat -node 17 18 19 -dof 1 2 3 4 5 6 disp

Notice the \\

Maybe it was because I more or less had everything in one directory and didn't see that I fucked up.

Jens

fmk
Site Admin
Posts: 5883
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk » Mon Mar 14, 2005 11:39 am

the problem you are having is with the \ .. \ in a string, i.e. enclosed in " ", is an indication of a character constant .. to get the string "\apple" you would have to use "\\apple" .. yours gets a little more compilated beacuase first the interpreter sees this as a string and then this is passed to the function .. this means you might need to use \\\\ i.e. 4 \ everywhere you have one .. so try something like this:

set AccelSeries2 "Path -filePath C:\\\\PreOpenSeesPost\\\\Matlab\\\\Examples\\\\Seisme31_1.g3 -dt $dt -factor 1000"

jpu
Posts: 7
Joined: Mon Jan 10, 2005 2:49 am
Location: Zurich
Contact:

Post by jpu » Tue Mar 15, 2005 12:38 am

fmk wrote:the problem you are having is with the \ .. \ in a string, i.e. enclosed in " ", is an indication of a character constant .. to get the string "\apple" you would have to use "\\apple" .. yours gets a little more compilated beacuase first the interpreter sees this as a string and then this is passed to the function .. this means you might need to use \\\\ i.e. 4 \ everywhere you have one .. so try something like this:

set AccelSeries2 "Path -filePath C:\\\\PreOpenSeesPost\\\\Matlab\\\\Examples\\\\Seisme31_1.g3 -dt $dt -factor 1000"
Yes, now it works - thanks a lot :)

As I am using Matlab to create my tcl files my path for the uniform excitation now look like this:

Model.Path.UniformExcitation='W:\\\\\\\\PreOpenSeesPost\\\\\\\\UniformExcitation\\\\\\\\';

This must be a new record of the correct number of backslashes needed in some correct coding :shock:

Post Reply