name of skill source file

C

camelot

Guest
Hi,
it is possible to get the name of the last loaded skill file?

Thank you,

Camelot
 
On Jul 16, 1:02 pm, camelot <sco...@tiscalinet.it> wrote:
Hi,
it is possible to get the name of the last loaded skill file?

Thank you,

Camelot
Hi,

I don't know how to get the last loaded skill file but I know how to
get a list of loaded files into your current Cadence session. The
skill function getAllLoadedFiles(). For this function to run, you need
to enable the debug mode prior in your cadence session by adding the
following skill line to your .cdsinit file for example:
installDebugger

I'm just wondering why your looking for the last loaded skill file. My
guess is might be you've got a function defined in different files and
you want to know where it is taken from really. If I'm right, you can
find this information by using the skill function whereIs(myFunction).
This requires the debugMode too.

This is a bit of skill that combines the use of getAllLoadedFiles()
and getFunctions to print out all the loaded files since the debug
mode has been turned on and for each file prints the functions defined
within it

;; Skill start here
procedure( rkGetLoadedFilesAndFuncs(outFile)
let((loadedFiles outPort functions)
outPort=outfile(outFile)
loadedFiles=getAllLoadedFiles( )
foreach(file loadedFiles
functions=getFunctions(file)
when(car(functions)
fprintf(outPort "\nFilename %s has the following Functions:\n"
file )
foreach(function functions
fprintf(outPort " -> %L \n" function )
)
)
)
close(outPort)
t
)
)
;; Skill end here

You can try in your CIW :
rkGetLoadedFilesAndFuncs("/tmp/LoadedFilesAndFuncs.txt")
You may try also:
whereIs(rkGetLoadedFilesAndFuncs)

Hope these bits help you !

Riad.
 
I'm just wondering why your looking for the last loaded skill file.
Hi Riad,
well, my purpose is very weird. I’m using the shell command dbAccess
to execute a skill script. In particular I launch the command in this
way:

dbAccess – load “mySkillFile.il”

Now, inside the skill file, I inserted same templates (as formatted
comments) that the program itself should generate if it is not able to
find them in the user account. In order to generate these templates, I
should be able to do a parsing of the skill file but the problem is to
know what is the name of the file I’m loading because the final user
could change the name of skill file o, worse, could encrypt it. Does
the debug mode requires extra licenses?

Regards,

Camelot
 
camelot wrote, on 07/18/08 08:39:
I'm just wondering why your looking for the last loaded skill file.

Hi Riad,
well, my purpose is very weird. I’m using the shell command dbAccess
to execute a skill script. In particular I launch the command in this
way:

dbAccess – load “mySkillFile.il”

Now, inside the skill file, I inserted same templates (as formatted
comments) that the program itself should generate if it is not able to
find them in the user account. In order to generate these templates, I
should be able to do a parsing of the skill file but the problem is to
know what is the name of the file I’m loading because the final user
could change the name of skill file o, worse, could encrypt it. Does
the debug mode requires extra licenses?

Regards,

Camelot
Camelot,

get_filename(piport)

will tell you the name of the file you're currently in (when it's being loaded).

Regards,

Andrew.
 
On 18 Lug, 12:55, Andrew Beckett <andr...@DcEaLdEeTnEcTe.HcIoSm>
wrote:
camelot wrote, on 07/18/08 08:39:





I'm just wondering why your looking for the last loaded skill file.

Hi Riad,
well, my purpose is very weird. I’m using the shell command dbAccess
to execute a skill script. In particular I launch the command in this
way:

dbAccess – load “mySkillFile.il”

Now, inside the skill file, I inserted same templates (as formatted
comments) that the program itself should generate if it is not able to
find them in the user account. In order to generate these templates, I
should be able to do a parsing of the skill file but the problem is to
know what is the name of the file I’m loading because the final user
could change the name of skill file o, worse, could encrypt it. Does
the debug mode requires extra licenses?

Regards,

Camelot

Camelot,

get_filename(piport)

will tell you the name of the file you're currently in (when it's being loaded).

Regards,

Andrew.- Nascondi testo citato

- Mostra testo citato
Thank you!
 

Welcome to EDABoard.com

Sponsor

Back
Top