Specify path for UniformExcitation
Moderators: silvia, selimgunay, Moderators
Specify path for UniformExcitation
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?
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?
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'.silvia wrote:what error do you get?
does the file actually exist?
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
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"
set AccelSeries2 "Path -filePath C:\\\\PreOpenSeesPost\\\\Matlab\\\\Examples\\\\Seisme31_1.g3 -dt $dt -factor 1000"
Yes, now it works - thanks a lotfmk 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"
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