Case filename variable
Is there a variable containing the name and path of the current loaded case?
Can it be retrived by UDF or scheme? Thanks |
Quote:
(in-package cl-file-package rc-filename) Scheme to get the case name: (strip-directory (in-package cl-file-package rc-filename)) If you want to use them in UDF, just use CX_Interpret_String command to let them recognized by UDF. i.e., CX_Interpret_String("(in-package cl-file-package rc-filename)"); CX_Interpret_String("(strip-directory (in-package cl-file-package rc-filename))"); |
Quote:
(directory (in-package cl-file-package rc-filename)) |
Thanks for the help,
|
it woks fine for scheme but in the UDF i get an Unbound variable erorr.
Do I have to add some #include file? |
Quote:
Another choice: write the scheme command in a scm file, e.g. D:\test.scm. Write two commands in it. (if(not(rp-var-object 'file-name))(rp-var-define 'file-name "" 'string #f) "") (rpsetvar 'file-name (in-package cl-file-package rc-filename)) Then in your UDF code. char*FileName; CX_Interpret_String("(ti-read-scheme \"D:\\test.scm\")"); FileName=RP_Get_String("file-name"); Message0("Current case name is %s\n",FileName); |
All times are GMT -4. The time now is 09:24. |