ASA Posted August 28, 2010 Share Posted August 28, 2010 Hi folks, I'm trying to update an old command script of mine (that applies a central repository of notes on a sheet by sheet basis thoughout working drawings). I need to add some new code for more filtering, etc. and it appears I am hitting some hard-coded limit on script size. It might be 32k chars. This is in VW9. Can anyone verify this? Is there a way around this? I'd appreciate any assistance or insight. Thanks, PJS @ ASA Quote Link to comment
Pat Stanford Posted August 28, 2010 Share Posted August 28, 2010 The script editor does have a limit of 32K characters. The compiler does not. Check the Vectorscript Language Guide for information on using {$INCLUDE} files. You will need to edit these using an external editor. Quote Link to comment
maarten. Posted August 28, 2010 Share Posted August 28, 2010 Is a plug in limited too? I thought that only document scripts were... Quote Link to comment
ASA Posted August 28, 2010 Author Share Posted August 28, 2010 Thanks for the {INCLUDE} clue, it looks like that takes care of the size limitation. Thanks again, PJS@ASA Quote Link to comment
Pat Stanford Posted August 28, 2010 Share Posted August 28, 2010 The limit is not on the size of the scripts, but on the script editor. As far as I know, both the Vectorscript Editor and the Vectorscript Plugin Editor are the same and have the same limitations. Learn about includes and external editors and you can make your scripts/plugins as large as you like. Quote Link to comment
Miguel Barrera Posted August 29, 2010 Share Posted August 29, 2010 32k seems kind of small for that to be a problem. Even in VW 9, scripts that I wrote were over 100k. I have reach a limit at over 250k where I would write some code, save it, open it again, and the new code would be lost. Quote Link to comment
maarten. Posted August 29, 2010 Share Posted August 29, 2010 On the Belgium board we had some problems with this too. A user made a document script and after he reopened it, everything after line 1039 was gone. When he made it a plug in, there was no problem. Quote Link to comment
MullinRJ Posted August 29, 2010 Share Posted August 29, 2010 The safest way I've found is to create a plugin with one line: {$INCLUDE \Your\script\file\pathname\here } Also, set VW Preference 407 to TRUE, which you can toggle with a script or with menu Tools > Scripts > VS Compiler Mode. This tells the compiler to recompile your code each time it is run. Use any text editor to make changes. You don't even have to close your editor window, just save after your changes and run again. Reshaper is over 1MB in source code and has 55 $INCLUDES. No signs of hitting any limits yet. This works equally well for menu commands, tools and plug-in objects. When you are done developing, you can have the compiler copy all your code into your plugin for distribution, or you can leave it as a multi-file $INCLUDE'd collection. The choice is yours. Raymond Quote Link to comment
Musisback Posted November 15, 2010 Share Posted November 15, 2010 I get some time very weird compiling errors when I use {$ include "files"}. Those errors don't have anythink to do with the included file. So i usually look for some mistake or mistyping for a while and I never find it. The only way to make them got away is to copy the exact same content of included file to the main file and the script compiles correctly. I don't know if this has to do with some script length limitation, but it is driving my crazy... Does anyone no what going on? Is this problem only in the Belgian version?? Help, Please..... Quote Link to comment
maarten. Posted November 16, 2010 Share Posted November 16, 2010 When you get weird or wrong Compile Errors, remove the Error Output.txt file in your user folder and Compile again. Sometimes an old Error is displayed. Quote Link to comment
Musisback Posted November 16, 2010 Share Posted November 16, 2010 No empty line ! That was the problem that made me loose so much time.... I don't know how missed this info before. This it is such an important one... Thanks, 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.