How to get current file name?

S

scyoyo

Guest
Hello, guys~~
A problem~~ I wanna to get the current filename in Allegro by SKILL.
eg: I open "a.brd" and I wanna to use a SKILL command to get its
filename and save it in a variable.
But after I search through the SKILL manual, I can't find such
commands. There's only command getCurrentDir().
Who knows? or can I find another way to get my filename such as using
"axlShell"?
Thank you~~
 
Hi There,

If you open a file called "a.brd", the you can get the full resolved
path to your file using the 'simplifyFilename' skill function.
this is a quick reference form the doc:

simplifyFilename(
t_name
[ g_dontResolveLinks ]
)
=> t_result

This a little example:
;1
myFileName= "helloScyoyo.txt"
myFilePath=simplifyFilename(myFileName)
;2
myFilePort=outfile(myFileName "a")
myFilePath=simplifyFilename(get_filename(myFilePort))

Hope this helps !
Riad.
 
Hi There,

If you open a file called "a.brd", the you can get the full resolved
path to your file using the 'simplifyFilename' skill function.
this is a quick reference form the doc:

simplifyFilename(
t_name
[ g_dontResolveLinks ]
)
=> t_result

This a little example:
;1
myFileName= "helloScyoyo.txt"
myFilePath=simplifyFilename(myFileName)
;2
myFilePort=outfile(myFileName "a")
myFilePath=simplifyFilename(get_filename(myFilePort))

Hope this helps !
Riad.
 
Thank you Riad~~
But I still have a question~~
You know, the simplifyFilename function can only get the path of the
current file, but I can't get the file name

I can open a file by using file-->open or axlShell("open ...")
but my purpose is to extract some infomation from a.brd and then open
a .dra file in Allegro to compare the data. After finishing this. I
want to open the a.brd again and show my results. I hope that all the
process could be done automatically so I need to record the filename
of a.brd in previous step.

Then how can I get the filename without opening a file manually? Is
there any special expression, symbol or function that can represent
the current name? (eg: "./" or getWorkingDir(), is there getFileName
or some similar func?)
 
What your program should do is totally unclear to me, but you may find
this helpful:

http://groups.google.fr/group/comp.cad.cadence/browse_thread/thread/84b00cc9e9310426


scyoyo wrote:
Thank you Riad~~
But I still have a question~~
You know, the simplifyFilename function can only get the path of the
current file, but I can't get the file name

I can open a file by using file-->open or axlShell("open ...")
but my purpose is to extract some infomation from a.brd and then open
a .dra file in Allegro to compare the data. After finishing this. I
want to open the a.brd again and show my results. I hope that all the
process could be done automatically so I need to record the filename
of a.brd in previous step.

Then how can I get the filename without opening a file manually? Is
there any special expression, symbol or function that can represent
the current name? (eg: "./" or getWorkingDir(), is there getFileName
or some similar func?)
 
Thank you~~~
it's helpful:)


On Nov 24, 1:08 am, fogh <adff_at@xs4all_dot.nl> wrote:
What your program should do is totally unclear to me, but you may find
this helpful:

http://groups.google.fr/group/comp.cad.cadence/browse_thread/thread/8...



scyoyo wrote:
Thank you Riad~~
But I still have a question~~
You know, the simplifyFilename function can only get the path of the
current file, but I can't get the file name

I can open a file by using file-->open or axlShell("open ...")
but my purpose is to extract some infomation from a.brd and then open
a .dra file in Allegro to compare the data. After finishing this. I
want to open the a.brd again and show my results. I hope that all the
process could be done automatically so I need to record the filename
of a.brd in previous step.

Then how can I get the filename without opening a file manually? Is
there any special expression, symbol or function that can represent
the current name? (eg: "./" or getWorkingDir(), is there getFileName
or some similar func?)- Hide quoted text -

- Show quoted text -
 
Hi Riad~~ I think I get it
A function axlCurrentDesign() can get the current design name



On Nov 19, 5:22 am, Riad KACED <riad.ka...@gmail.com> wrote:
Hi There,

If you open a file called "a.brd", the you can get the full resolved
path to your file using the 'simplifyFilename' skill function.
this is a quick reference form the doc:

simplifyFilename(
  t_name
  [ g_dontResolveLinks ]
)
=> t_result

This a little example:
;1
myFileName= "helloScyoyo.txt"
myFilePath=simplifyFilename(myFileName)
;2
myFilePort=outfile(myFileName "a")
myFilePath=simplifyFilename(get_filename(myFilePort))

Hope this helps !
Riad.
 

Welcome to EDABoard.com

Sponsor

Back
Top