Does Rhino embed scripts somewhere in the file?

My issue is that couple of Rhino scripts on our drive got updated (just the code), and now when I run them in one of our old files (-loadscript “script.rvb”), rhino runs the old outdated code that doesn’t exist anywhere on the drive as a file anymore.

Even if I remove all the Search file paths to custom folders where the scripts are located, rhino would just run the script out of thin air.

It feels like the old scripts are embedded in the file and I have no clue how to purge them out.

Have you tried restarting Rhino?

Also - try running the script editor _EditScript and then load the (new, edited) scripts in the editor and run them from there. Does that work?

Yes, it works out of the script editor just as it supposed to. Restarting doesn’t help.

The workaround I found is to rename the script file and run the new name script file instead.

If the same file is opened on another machine, the new code will run. It seems like it’s my machine doing something somewhere…

If it’s all one session of Rhino then I guess that is expected, maybe, but I doubt that is the case - but ResetRhinoScript might clear the decks.

-Pascal

ResetRhinoScript does not fix it. What does is changing the template file to some other one. That fixes it for the current session. Not sure how those are related, but found it out on accident.

R6 now is plagued by the same issue… It’s mildly infuriating…
Could it be Windows problem? As I said, the code that’s being run doesn’t exist in the folder where all the scripts are ran from… Neither should it exist anywhere else on the disk drive to my knowledge.

Do you have anything in your startup scripts section? Or a custom command that runs on startup that calls a Rhinoscript? Or a plug-in that automatically loads some scripts?

Nothing. Everything is stock. The scripts we use are ran on per needed basis.
All plug-ins are what comes with R6. Stock.


I am mystified… can you post an example of the full macro that runs one of these incorrectly?

-Pascal

'-LOADSCRIPT “3D_Tagger.rvb”

Would you mind looking in Options>Files>SearchPaths and see if there is a path in there leading somewhere else than you expect? Mine looks like this:

image

The first entry I did not put there myself, so I imagine Rhino added it at some point. In there look like some images from picture frame (which seems odd) but nothing else. The last two I put in there myself.

image

So the next thing is to locate all files of this name that your machine has access to. There has to be more than one, is my contention.

-Pascal

What’s the default script folder for Rhinoscript scripts? Searching through the whole C drive ATM.

Try running

! _-LoadScript _List

-Pascal


image

Renaming R5 script fixes the problem here. I think R6 somehow uses R5 filepath.

When GoogleDrive updated, here, to ‘FileStream’, it left the old GoogleDrive folders intact and I did have some goofiness from time to time until I figured that out and removed it. Just a thought…

-Pascal

Yeah, I think I’ll end up renaming all R6 files and revise aliases. No big deal. The issue just keeps popping up.