Dieter @ DWorks Posted August 1, 2007 Share Posted August 1, 2007 Why is there a max 'file size' for a VS file? It seems that you can write code and when you reach a certain point, you can't add anymore. Why is this? Is it a max file size? Or is it another reason? Quote Link to comment
wezelboy Posted August 1, 2007 Share Posted August 1, 2007 Is it a limitation on the editing pane, or a limitation on the interpreter? If it is the editing pane, you might want to try moving a bunch of your functions to an external file and then use the #INCLUDE compiler directive to access them. Quote Link to comment
PeterT Posted August 3, 2007 Share Posted August 3, 2007 (edited) Are you working on a script that is on a script palette? I think there is a maximum number of lines of code on scripts on a script palette (Somewhere around a thousand lines of code). If this is the problem, paste your script into the VectorScript PlugIn Editor as a new menu command or tool, and work on it there. I do not beleive there is a limit in the plug-In editor. But if your code is gettig that long, you might want to consider wezelboy's suggestion and use an Include file anyway. Edited August 3, 2007 by PeterT Quote Link to comment
Dieter @ DWorks Posted August 4, 2007 Author Share Posted August 4, 2007 I'm working in the plug-in editor. I always do. And the problem is that I need to encrypt it later, so all need to be in the same file. Quote Link to comment
PeterT Posted August 6, 2007 Share Posted August 6, 2007 Maybe I have just never reached the limit. How many lines of code does it stop at? Quote Link to comment
wezelboy Posted August 6, 2007 Share Posted August 6, 2007 You could win the obfuscation prize and strip out all of your newlines. In theory, it should still work ;-) One thing that I have noticed is that if you copy and paste between a third party editor (TextEdit in my case) and the editing pane, editing can get hosed where you often cannot insert a new line. Quote Link to comment
MullinRJ Posted August 7, 2007 Share Posted August 7, 2007 ???The Script Editor is limited to 32K characters, not lines. The Plug-in Editor does not have that limit. Using $Includes in the Script Editor will not get around the 32K limit, since all the included files are copied into memory before your code is compiled and run. If it exceeds 32K, it will kick an error. ???Large scripts can be developed easily using the PlugIn Editor. If you place an $Include statement as the first an only line in the PlugIn Script section pointing to a text file that contains your code, you can make changes to the text file, save it and run the script again without opening the PlugIn Editor. You will also need to enable the "Don't Cache Plug-in Scripts" VW Preference (407) to force VW to recompile the script each time it is run. Use the menu Tools>Scripts>VS Compiler Mode to toggle this setting. ???It is also possible to use many $Include statements and nest them several layers deep. My Reshaper 12 program is 625K and uses 46 $Includes, 3 levels deep. I've not yet had problems working this way. Good luck, Raymond Quote Link to comment
Dieter @ DWorks Posted August 7, 2007 Author Share Posted August 7, 2007 I know I can work with Includes, that's no problem. But I was asking myself why you cannot write more code in the plug-in editor. I noticed that it is not limited by lines, but when you reach a certain point, you can't add no more. So I think it is because of the number of letters in the code, so it must have a size limit. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.